Stop the timeout calibration ever returning 0
authorIan Lynagh <igloo@earth.li>
Tue, 21 Aug 2007 13:50:55 +0000 (13:50 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 21 Aug 2007 13:50:55 +0000 (13:50 +0000)
testsuite/timeout/calibrate

index a18eb84..8379c2d 100644 (file)
@@ -21,5 +21,8 @@ spawnl(os.P_WAIT, compiler,
 spawnl(os.P_WAIT, './TimeMe', 'TimeMe')
 
 xs = getrusage(RUSAGE_CHILDREN);
-print (300*int(math.ceil(xs[0] + xs[1])))
+x = int(math.ceil(xs[0] + xs[1]))
+if x < 1:
+    x = 1
+print (300*x)