Utility for timing
@@ -347,3 +347,16 @@ def get_file_creation_date(path_to_file):
# We're probably on Linux. No easy way to get creation dates here,
# so we'll settle for when its content was last modified.
return stat.st_mtime
+
+_timer_time = 0
+def start_time(text=""):
+ global _timer_time
+ print("RESET", text)
+ _timer_time = time.time()
+
+def lap_time(text):
+ global _timer_time
+ new_time = time.time()
+ print("LAP", text, round(new_time - _timer_time, 4))
+ _timer_time = time.time()
+
\ No newline at end of file
