HighPerformanceCounter rounding

Lutger lutger.blijdestijn at gmail.com
Wed Oct 25 07:00:50 PDT 2006


Lutger wrote:
> nobody_ wrote:
<snip>
> 
> It's probably because of the sleep function, this can be off by about 10 
> to 16 ms usually on windows, iirc.
> 
> Beware that sometimes QueryPerformanceCounter, which 
> HighPerformanceCounter uses, can behave erratically on dualcore systems 
> and systems with variabele clock speeds (Intel's Speed Step, AMD's cool 
> 'n quiet).

Some more information, including how to set the granularity of sleep to 
1 ms (second link):
http://blogs.msdn.com/oldnewthing/archive/2005/09/02/459952.aspx
http://www.geisswerks.com/ryan/FAQS/timing.html




More information about the Digitalmars-d-learn mailing list