Boost logo

Boost Users :

Subject: [Boost-users] boost::interprocess::interprocess_semaphore::timed_wait - how to do a relative wait
From: Jean-Sebastien Stoezel (js.stoezel_at_[hidden])
Date: 2011-02-14 17:41:02


Hi:

I'm using boost::interprocess::interprocess_semaphore::timed_wait and
boost::interprocess::message_queue::timed_received. I have to specify an
absolute time to give up waiting/receiving.

This works in most cases, except my application sometimes needs to adjust
the PC clock. If the PC clock is adjusted backwards in time, then these
function wait longer than they should (since the end time is fixed in the
future).

Ideally I would like to provide an absolute time instead, which would be
independent of the time of day? The API doesn't seem to allow this.

How can I do this? I guess I could also use a deadline timer (ASIO).

Any help on this would be appreciated.

Thanks,
Jean



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net