high resolution time needed

Diez B. Roggisch deetsNOSPAM at web.de
Mon Feb 21 17:23:28 EST 2005


> I need a function returning a time value with a higher resolution that the
> standard 1sec unix timestamp. I found the clock() function in the time
> module, but that seems to return the same value (in the Python shell) each
> time I call it (Debian Linux speaking here).

Standard unix is a millisecond. And time.time() actually delivers a float
with sub-second precision. 


------------
import time
t = time.time()
time.sleep(.25)
print time.time() - t
------------

gives for me (also debian) 0.249767065048 secs.

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list