How to measure time taken between lines of code in python?
If you want to measure CPU time, can use time.process_time() for Python 3.3 and above: import time start = time.process_time() # your code here print(time.process_time() – start) First call turns the timer on, and second call tells you how many seconds have elapsed. There is also a function time.clock(), but it is deprecated since Python … Read more