devxlogo

September 26, 2017

How to Capture Compute Time in Python

Import the time module and call the time function. The units are in Seconds. See below for an easy example. import timestartTime= time.time()”time consuming stuff”time consuming stuff”time consuming stuffendTime =