1import time
2
3start = time.time()
4print("hello")
5end = time.time()
6print(end - start)
1import time
2
3start = time.time()
4print("hello")
5end = time.time()
6print(end - start)
7
1import time
2t0= time.clock()
3print("Hello")
4t1 = time.clock() - t0
5print("Time elapsed: ", t1) # CPU seconds elapsed (floating point)