Rollover/wraparound time of time.clock() under win32?
Peter Hansen
peter at engcorp.com
Wed Sep 28 20:21:08 EDT 2005
Russell Warren wrote:
> Does anyone know how long it takes for time.clock() to roll over under
> win32?
>
> I'm aware that it uses QueryPerformanceCounter under win32... when I've
> used this in the past (other languages) it is a great high-res 64-bit
> performance counter that doesn't roll-over for many (many) years, but
> I'm worried about how many bits Python uses for it and when it will
> roll over.
Check the source for yourself:
http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/timemodule.c?rev=2.144&view=auto
(It takes the full 64-bit value and divides by the frequency, returning
a double. Whether or not that works for you only you can say.)
-Peter
More information about the Python-list
mailing list