0
from time import clock, sleep

for i in range(100):
    t1 = clock()
    sleep(0.123)
    t2 = clock()
    print(t2-t1)

enter image description here

Why are most of the timings below 0.123?

On unix (using time.time() instead of time.clock() as suggested in the manuals), all times are above 0.123 just as expected.

Antony Hatchkins
  • 31,947
  • 10
  • 111
  • 111

0 Answers0