time.clock() and precision...

Steven Adams adams_s at lab.eng.usyd.edu.au
Sat Aug 12 08:05:38 EDT 2000


on a related note: is there a way to get time.clock() on WindowsCE to clock
with any more precision than a single second - it outputs a float, but it
effectively only gives integers

e.g.
>>> time.clock()
966081403.0
>>> print time.clock(); time.sleep(2); print time.clock()
966081797.0
966081799.0

Steven

"Lurker" <lurker at pobox.comNOSPAM> wrote in message
news:3994BAE5.934CDD51 at pobox.comNOSPAM...
> I am writing some code that does some timing. I am writing it for both a
> MS-Windows machine and a GNU/Linux box (RH 6.2).
>
> Problem: the precision of the time.clock() function is fine on
> MS-Windows,
> but not on GNU/Linux where it is only precises to 0.01 seconds.
>
> I am working in milliseconds. Is there a way to get the precision I
> need???
>
> --
> - Todd Warner -
>   Staff Sergeant:    US Army Tank Commander (HOOAH!!!)
>   Senior CS student: Wright State University
>   mailto:            taw at pobox.com





More information about the Python-list mailing list