From: Dave Mitchell Date: Mon, 8 Jan 2007 00:14:22 +0000 (+0000) Subject: fix occasional op/time.t failure X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=584ba4d5a2c5892744e31d4dc44d2eeeddf5030f;p=p5sagit%2Fp5-mst-13.2.git fix occasional op/time.t failure test 2 uses far more sys than user time, so it's possible to burn 20 secs of wall time without an apparent increase in user time p4raw-id: //depot/perl@29712 --- diff --git a/t/op/time.t b/t/op/time.t index 330cc86..8b2f07d 100755 --- a/t/op/time.t +++ b/t/op/time.t @@ -19,6 +19,7 @@ while (($now = time) == $beg) { sleep 1 } ok($now > $beg && $now - $beg < 10, 'very basic time test'); for ($i = 0; $i < 1_000_000; $i++) { + for my $j (1..100) {}; # burn some user cycles ($nowuser, $nowsys) = times; $i = 2_000_000 if $nowuser > $beguser && ( $nowsys >= $begsys || (!$nowsys && !$begsys));