summaryrefslogtreecommitdiffstats
path: root/Lib/test/pystone.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2014-06-04 18:45:05 (GMT)
committerGuido van Rossum <guido@python.org>2014-06-04 18:45:05 (GMT)
commit2aebd4a816cb0439dc06ee6449c9a06a8931cd3f (patch)
tree5610e6f96fb0db9d5798943dda8be25abf6c2f61 /Lib/test/pystone.py
parent9661efe6a7fb8f1f910e6fe6f0f363d43112c5e5 (diff)
downloadcpython-2aebd4a816cb0439dc06ee6449c9a06a8931cd3f.zip
cpython-2aebd4a816cb0439dc06ee6449c9a06a8931cd3f.tar.gz
cpython-2aebd4a816cb0439dc06ee6449c9a06a8931cd3f.tar.bz2
Replace deprecated time.clock() with time.time(). Fixes issue #20475.
Diffstat (limited to 'Lib/test/pystone.py')
-rwxr-xr-xLib/test/pystone.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/pystone.py b/Lib/test/pystone.py
index a41f1e5..1f67e66 100755
--- a/Lib/test/pystone.py
+++ b/Lib/test/pystone.py
@@ -41,7 +41,7 @@ Version History:
LOOPS = 50000
-from time import clock
+from time import time
__version__ = "1.2"
@@ -93,10 +93,10 @@ def Proc0(loops=LOOPS):
global PtrGlb
global PtrGlbNext
- starttime = clock()
+ starttime = time()
for i in range(loops):
pass
- nulltime = clock() - starttime
+ nulltime = time() - starttime
PtrGlbNext = Record()
PtrGlb = Record()
@@ -108,7 +108,7 @@ def Proc0(loops=LOOPS):
String1Loc = "DHRYSTONE PROGRAM, 1'ST STRING"
Array2Glob[8][7] = 10
- starttime = clock()
+ starttime = time()
for i in range(loops):
Proc5()
@@ -134,7 +134,7 @@ def Proc0(loops=LOOPS):
IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1
IntLoc1 = Proc2(IntLoc1)
- benchtime = clock() - starttime - nulltime
+ benchtime = time() - starttime - nulltime
if benchtime == 0.0:
loopsPerBenchtime = 0.0
else: