Anomaly in time.clock()

Tim Roberts timr at probo.com
Sat Mar 22 22:03:29 EDT 2008


Godzilla <godzillaismad at gmail.com> wrote:
>
>Just found out that win32api.GetTickCount() returns a tick count in
>milli-second since XP started. Not sure whether that is reliable.
>Anyone uses that for calculating elapsed time?

What do you mean by "reliable"?  The tick count is updated as part of
scheduling during timer interrupts.  As long as no one disables interrupts
for more than about 15ms, it is reliable.

However, it's only a 32-bit value, so the number rolls over every 49 days.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list