Boost logo

Boost Users :

From: Aaron W. LaFramboise (aaronrabiddog51_at_[hidden])
Date: 2004-05-06 18:35:02


Jeff Flinn wrote:

>>Windows system time GetSystemTime()
>> Granularity: 100 nanoseconds
>> Precision: approximately 10 milliseconds
>> (Approximately 55ms on Windows 95/98/ME, 15ms on Windows NT 3.1.)
>> (Presently reported as 10.0144 milliseconds.)
>> Apparent precision: 0.010066666666666666 seconds
>> Apparent jitter: 0.00014285714285714287 seconds
>>
>>Windows system time in file time GetSystemTimeAsFileTime()
>> Granularity: 100 nanoseconds
>> Precision: Same as system time
>> Apparent precision: 0.0100144 seconds
>> Apparent jitter: 0 seconds
>>
>>
>
>FYI see ::timeBeginPeriod / ::timeEndPeriod to get Precision down near 1ms
>on WindowsNT/2K/XP. THis also affects ::Sleep.
>
>

Are you sure?

I only thought that affected timeGetTime (and on recent Windows, I think
its by default 1ms anyway).

The documentation mentions that the precision of the system clock is
equal to the frequency of the clock interrupt. The system time is
incremented by a particular value (that you can set with
SetSystemTimeAdjustment()) each clock interrupt to maintain the clock.

In any case, in a quick test, calling timeBeginPeriod doesn't seem to
have any affect on the GetSystemTime() and friends. Not sure about
Sleep() though.

Aaron W. LaFramboise


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