time.clock() and precision...

pehr anderson pehr at pehr.net
Thu Aug 17 02:11:37 EDT 2000


Dear Lurker, 

If you just mark your time by logging time.time as 
soon as you possibly can, the default time.time 
function in python has really good resolution.  
Isn't this going to be satisfactory?  

	-pehr

Lurker wrote:
> 
> 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