Kaydet (Commit) 59ec315b authored tarafından Georg Brandl's avatar Georg Brandl

#3319: don't raise ZeroDivisionError if number of rounds is so

low that benchtime is zero.
üst 278fc50c
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment