I run Mac OS X 10.8 and get weird behavior for time.clock (), which, as some online sources report, I prefer over time. For instance:
import time t0clock = time.clock() t0time = time.time() time.sleep(5) t1clock = time.clock() t1time = time.time() print t1clock - t0clock print t1time - t0time 0.00330099999999 <-- from time.clock(), clearly incorrect 5.00392889977 <-- from time.time(), correct
Why is this happening? Should I just use time.time () for reliable estimates?
source share