diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-22 21:31:31 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-22 21:31:31 +0000 |
commit | cb11fff93f78facdc8f5c177e1ef8e2dd23467e8 (patch) | |
tree | d8888f24601b9fd77550618f5bb992f5988011a2 /ext/Time | |
parent | db8356711f401c24973a599023742ac2f28fd86f (diff) | |
download | perl-cb11fff93f78facdc8f5c177e1ef8e2dd23467e8.tar.gz |
Cygwin seems to round up (or closest, but not down)
for time(), so half of the time (bad pun intended)
Time::HiRes::time() is less than time(), half of
the time it's more. So let's try harder in the loop.
p4raw-id: //depot/perl@12595
Diffstat (limited to 'ext/Time')
-rw-r--r-- | ext/Time/HiRes/HiRes.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/Time/HiRes/HiRes.t b/ext/Time/HiRes/HiRes.t index e0f0cf7889..fbf6a3f7ef 100644 --- a/ext/Time/HiRes/HiRes.t +++ b/ext/Time/HiRes/HiRes.t @@ -134,14 +134,14 @@ if (!$have_time) { skip 14 } else { my ($t1, $tf, $t2); - for my $i (1 .. 9) { + for my $i (1 .. 20) { $t1 = time(); $tf = Time::HiRes::time(); $t2 = 1 + time(); - last if (($t2 - $t1) <= 1); + last if (($t2 - $t1) <= 1) && $t1 <= $tf; } ok 14, (($t1 <= $tf) && ($tf <= $t2)), - "Time::HiRes::time $tf not bracketed by $t1 - $t2"; + "Time::HiRes::time $tf not bracketed by [$t1, $t2]"; } |