count time python code example
Example 1: How to check how much time elapsed Python
import time
t0= time.clock()
print("Hello")
t1 = time.clock() - t0
print("Time elapsed: ", t1) # CPU seconds elapsed (floating point)
Example 2: python counter for job time
>>> from timer import Timer
>>> t = Timer()
>>> t.start()
>>> t.stop() # A few seconds later
Elapsed time: 3.8191 seconds