From 5e73837de8e294398565555d7e03d16027e29771 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 25 May 2025 15:02:26 +0200 Subject: ... --- overlays/worktime/worktime/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overlays/worktime/worktime/__main__.py b/overlays/worktime/worktime/__main__.py index 30610b1d..79e1cbb7 100755 --- a/overlays/worktime/worktime/__main__.py +++ b/overlays/worktime/worktime/__main__.py @@ -47,7 +47,7 @@ import asyncio from frozendict import frozendict from contextlib import closing import os -import time +from time import clock_gettime_ns, CLOCK_MONOTONIC from atomicwriter import AtomicWriter class BearerAuth(requests.auth.AuthBase): @@ -923,13 +923,13 @@ async def ui_update_options(api, cache_path): sort_order = dict() entry_iter = enumerate(api.get_recent_entries()) loop = asyncio.get_event_loop() - start = time.clock_gettime_ns(time.CLOCK_MONOTONIC) + start = clock_gettime_ns(CLOCK_MONOTONIC) while item := await loop.run_in_executor(None, next, entry_iter): ix, entry = item if len(options) >= 20 or ix >= 1000: break elif len(options) >= 3: - now = time.clock_gettime_ns(time.CLOCK_MONOTONIC) + now = clock_gettime_ns(CLOCK_MONOTONIC) if now - start >= 4000000000: break -- cgit v1.2.3