Source code for utility.stopwatch
import time
[docs]
def startWatch():
startTimeStampPerf = time.perf_counter()
startTimeStampProcess = time.process_time()
return (startTimeStampPerf, startTimeStampProcess)
[docs]
def stopWatch(startTimeStamps):
endTimeStampPerf = time.perf_counter()
endTimeStampProcess = time.process_time()
deltaTimePerf = endTimeStampPerf - startTimeStamps[0]
deltaTimeProcess = endTimeStampProcess - startTimeStamps[1]
return (deltaTimePerf, deltaTimeProcess)