summaryrefslogtreecommitdiffstats
path: root/Lib/test/reperf.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/reperf.py')
-rw-r--r--Lib/test/reperf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/reperf.py b/Lib/test/reperf.py
index 7c68234..e93bacd 100644
--- a/Lib/test/reperf.py
+++ b/Lib/test/reperf.py
@@ -9,13 +9,13 @@ def main():
timefunc(10, p.findall, s)
def timefunc(n, func, *args, **kw):
- t0 = time.clock()
+ t0 = time.perf_counter()
try:
for i in range(n):
result = func(*args, **kw)
return result
finally:
- t1 = time.clock()
+ t1 = time.perf_counter()
if n > 1:
print(n, "times", end=' ')
print(func.__name__, "%.3f" % (t1-t0), "CPU seconds")