Skip to content

Commit

Permalink
Use time.perf_counter()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Feb 2, 2024
1 parent 218916f commit 5455b9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distance3d/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ def __init__(self):
self.total_time_ = {}

def start(self, name):
self._start_time[name] = time.time()
self._start_time[name] = time.perf_counter()

def stop(self, name):
stop_time = time.time()
stop_time = time.perf_counter()
assert name in self._start_time
return stop_time - self._start_time[name]

Expand Down

0 comments on commit 5455b9c

Please sign in to comment.