We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 027fff3 commit 6889335Copy full SHA for 6889335
python-callable-instances/timing.py
@@ -22,9 +22,9 @@ def timer(*args, **kwargs):
22
total_time = 0
23
print(f"Running {func.__name__}() {self.repetitions} times")
24
for _ in range(self.repetitions):
25
- start = time.time()
+ start = time.perf_counter()
26
result = func(*args, **kwargs)
27
- end = time.time()
+ end = time.perf_counter()
28
total_time += end - start
29
average_time = total_time / self.repetitions
30
print(
0 commit comments