Import the time module and call the time function. The units are in Seconds.
See below for an easy example.
import time
startTime= time.time()
"time consuming stuff
"time consuming stuff
"time consuming stuff
endTime = time.time()
print(endTime - startTime)