is there better 32 clock() timing?
rays at blue-cove.com
Fri Jan 21 20:29:00 CET 2005
I have a need for a time.clock() with >0.000016 second (16us) accuracy.
The sleep() (on Python 2.3, Win32, at least) has a .001s limit.
Are they lower/better on other's platforms?
Test code, 2.4GHz P4
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
t0 = time.clock()
t1 = time.clock()
t2 = time.clock()
t3 = time.clock()
t4 = time.clock()
t5 = time.clock()
I had also considered forking a thread that would spin a loop checking time.clock() and firing the TTL pulse after the appropriate interval, but the real, ultimate resolution of time.clock() appears to be ~.00035s. If I increase process priority to real-time, it is ~.00028s
The alternative appears to be more C code...
More information about the Python-list