Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-02-18 17:00:53


At 07:30 PM 2/13/2005, christopher diggins wrote:

>> No, there is a very particualar problem relating to
>> QueryPerformanceCounter() on some (old?) chipsets the can cause it go
>> backwards in time and wrap after approximately 20 minutes. I reported
this
>
>> to microsoft some years ago and it was confirmed an issue. (at the time

>> only happened to me on one particualar celeron / motherboard
>> configuration). By backwards in time I mean you could call the counter
in
>
>> a loop and have a reported time earlier than one got the previous
>> iteration.
>
>Really? That is different than the issue documentation I found at
>http://support.microsoft.com/default.aspx?scid=kb;EN-US;q274323 which
stats
>that the QueryPerformanceCounter() can jump *ahead* a few seconds. I
wonder
>if the status of the issue has changed to this new version or the
>documentation just sux.

There is another problem with QueryPerformanceCounter(); the latency (time
spent executing the call itself) varies dramatically depending on (1) the
version on Windows, and (2) which compiler was used. Why the compiler
should have a strong effect on the latency of an API call is a mystery.

John Maddock and I ran some tests several years ago, and both of us could
reproduce the effects. I recently downloaded some timing code written by
someone else, tried it with several compilers and the effect still appears
to exist with current compilers. So be careful, and be sure to test with
different versions of Windows and different compilers.

--Beman


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