Larry Hastings <la...@hastings.org> added the comment:

> In Windows the high-precision counter might return different results
> on different cores in some hardware configurations (older multi-core
> processors).

More specifically: some older multi-core processors where the HAL implements 
QueryPerformanceCounter using the TSC from the CPU, and the HAL doesn't keep 
the cores in sync and QPC doesn't otherwise account for it.  This is rare; 
frequently QPC is implemented using another source of time.

But it's true: QPC is not 100% reliable.  QPC can unfortunately jump backwards 
(when using TSC and you switch cores), jump forwards (when using TSC and you 
switch cores, or when using the PCI bus timer on P3-era machines with a 
specific buggy PCI south bridge controller), speed up or slow down (when using 
TSC and not accounting for changing CPU speed via SpeedStep &c).  The simple 
solution: give up QPC and use timeGetTime() with timeBeginPeriod(1), which is 
totally reliable but only has millisecond accuracy at best.

http://www.virtualdub.org/blog/pivot/entry.php?id=106
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323&;

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to