diff --git a/tools/trace/timer.py b/tools/trace/timer.py index a4953dc..50ad710 100644 --- a/tools/trace/timer.py +++ b/tools/trace/timer.py @@ -43,10 +43,10 @@ def __enter__(self) -> None: def __exit__(self, *exc: object) -> None: """Run when exit ContextManager or Decoraotr.""" - from tools import Logger - self.end = time.time() + from tools import Logger + logger = Logger(self.name) logger.debug("executed in %f ms", self._duration * 1_000)