Boost logo

Boost :

From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-07-02 09:12:16


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, July 02, 2002 6:35 AM
Subject: Re: [boost] Re: Re: xtime and GetSystemTimeAsFileTime

> From: "Johan Nilsson" <johan.nilsson_at_[hidden]>
> >
> > Anyway, as long as correlation between absolute system time (xtime is
time
> > elapsed since midnight, 1st of Jan 1970, or?) and sleep goodnight/wakeup
> > times are a concern, you'd have to use the time increment acquired from
> GSTA
> > as timeGetTime() and QueryPerformanceCounter() et al simply returns a
> > counter.
>
> Yes, timeGetTime() et al are "monotonic time" and not UTC time; I don't
know
> why UTC was chosen for Boost.Threads.

Compatibility with POSIX. By default the timed waits in POSIX rely on a UTC
clock type. There's an _optional_ "advanced realtime" portion of POSIX
(indicated by _POSIX_CLOCK_SELECTION) that allows POSIX to specify the clock
type to use, allowing the more logical monotonic clock selection. The next
version of Boost.Threads is adding various "attribute" types, at which time
will be able to specify the usage of a monotonic clock (if it's an available
option on the platform) as well.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk