Skip to content

Commit

Permalink
Merge pull request #4 from DIAGNijmegen/pref_counter
Browse files Browse the repository at this point in the history
Use more performant timing
  • Loading branch information
pkcakeout authored Aug 21, 2024
2 parents d60e931 + 4fc29b6 commit 45e9f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cirrus_benchmark_suite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 45e9f64

Please sign in to comment.