I think this should use time.monotonic() or time.perf_counter() instead of time.time() so that it is not affected by system time adjustments.
It also might be useful to include the difference in time.process_time() as an extra (possibly optional?) output.
I think this should use
time.monotonic()ortime.perf_counter()instead oftime.time()so that it is not affected by system time adjustments.It also might be useful to include the difference in
time.process_time()as an extra (possibly optional?) output.