From 4fc29b6cf52b4b8eb310b08ae622e9b352cf962d Mon Sep 17 00:00:00 2001 From: Chris van Run Date: Fri, 16 Aug 2024 16:11:02 +0200 Subject: [PATCH] Use more performant timing --- cirrus_benchmark_suite/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cirrus_benchmark_suite/utils.py b/cirrus_benchmark_suite/utils.py index a33d481..e4a4e1a 100644 --- a/cirrus_benchmark_suite/utils.py +++ b/cirrus_benchmark_suite/utils.py @@ -23,11 +23,11 @@ class Timer(ContextDecorator): elapsed_time = None # ms def __enter__(self): - self.start_time = time.time() + self.start_time = time.perf_counter() return self def __exit__(self, *_, **__): - self.end_time = time.time() + self.end_time = time.perf_counter() self.elapsed_time = round((self.end_time - self.start_time) * 1000)