summaryrefslogtreecommitdiffstats
path: root/Lib/test/pystone.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/pystone.py')
-rwxr-xr-xLib/test/pystone.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/pystone.py b/Lib/test/pystone.py
index bbf43cc..614551f 100755
--- a/Lib/test/pystone.py
+++ b/Lib/test/pystone.py
@@ -128,7 +128,11 @@ def Proc0(loops=LOOPS):
IntLoc1 = Proc2(IntLoc1)
benchtime = clock() - starttime - nulltime
- return benchtime, (loops / benchtime)
+ if benchtime == 0.0:
+ loopsPerBenchtime = 0.0
+ else:
+ loopsPerBenchtime = (loops / benchtime)
+ return benchtime, loopsPerBenchtime
def Proc1(PtrParIn):
PtrParIn.PtrComp = NextRecord = PtrGlb.copy()