Boost logo

Boost :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-11-28 17:24:51

Anthony Williams wrote:


> As far as I can gather, POSIX expects the latter. Windows only offers
> relative timeouts, so we get the former, though there's a potential
> race between calculating "now" vs changing the clock. If I had a
> reliable way to abort a wait if the clock changed.

For Windows: As you said yourself earlier, WM_TIMECHANGE is available.
Create a hidden window and run the message loop in a worker thread to catch
those msgs. This could presumably be implemented using some kind of lazy
init to work transparently even for the DLL version of Boost.Thread.

IIRC, WM_TIMECHANGE is broadcasted by the system on time changes since w2k
(and strongly recommended for applications before that). Whether that is
reliable enough would be up to you.

/ Johan

Boost list run by bdawes at, gregod at, cpdaniel at, john at