Boost logo

Boost :

From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2002-07-02 05:00:46


"Pete Becker" <petebecker_at_[hidden]> wrote in message
news:5.1.0.14.2.20020701095017.00bcefd0_at_pop.rcn.com...
> At 06:55 AM 7/1/2002 -0500, William Kempf wrote:
> >>From: "Simon J. Julier" <sjulier_at_[hidden]>
> >>
> >>1. The Windows system timer runs between 10ms and 55ms, depending on the
> >>version of Windows used
>
>>(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/
ti
> >>me_5h2d.asp). Reinhold tells me that the value returned by
> >>GetSystemTimeAsFileTime seems to update at the same rate.
> >
> >This one I consider a non-issue. The xtime stuff does not promise any
> >kind of granularity, so a 10-55ms variation on different Windows
platforms
> >is not a "violation" of the implied contract here.
>

[snip]

> an exact multiple of the xtime clock tick rate. Ideally, thread::sleep
> would the number of milliseconds up to the next higher tick boundary, but
> that boundary isn't generally known.

Under NT, you can use GetSystemTimeAdjustment(..,lpTimeIncrement,..) to find
out how often the system time is updated and by what amount. The Win9x
family of "operating systems" will hopefully quickly become an extinct
species.

But, of course, you can never know where in the current tick period you
actually are (if there would be a requirement to allow sleeping for less
than a clock period whenever possible).

// Johan


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