import time
[docs]class StopWatch:
def __init__(self):
self.start = time.perf_counter()
[docs] def reset(self):
self.start = time.perf_counter()
[docs] def stop(self, msg="Time it took: "):
ret = time.perf_counter() - self.start
print(msg + str(ret))
self.reset()
return ret