Skip to content

Commit

Permalink
Fix deprecated method in bench_time_func example (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimes committed Sep 6, 2024
1 parent a833224 commit 6fa3c0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/examples/bench_time_func.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
import time
import pyperf


def bench_dict(loops, mydict):
range_it = range(loops)
t0 = pyperf.perf_counter()
t0 = time.perf_counter()

for _ in range_it:
mydict['0']
Expand All @@ -18,7 +19,7 @@ def bench_dict(loops, mydict):
mydict['800']
mydict['900']

return pyperf.perf_counter() - t0
return time.perf_counter() - t0


runner = pyperf.Runner()
Expand Down

0 comments on commit 6fa3c0b

Please sign in to comment.