added high precision, thousandsth, time precision

This commit is contained in:
John Poole 2026-05-16 08:09:06 -07:00
commit 561449e496
4 changed files with 22 additions and 3 deletions

View file

@ -48,7 +48,10 @@ temporary_config_dir = None
def log(msg):
print(f"[{time.strftime('%H:%M:%S')}] {msg}", flush=True)
now = time.time()
timestamp = time.strftime("%H:%M:%S", time.localtime(now))
milliseconds = int((now % 1) * 1000)
print(f"[{timestamp}.{milliseconds:03d}] {msg}", flush=True)
def stop(_signum=None, _frame=None):