projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5b1c16
)
Can't expect too much accuracy from a sleep of one second.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Tue, 16 Oct 2001 17:07:20 +0000
(17:07 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Tue, 16 Oct 2001 17:07:20 +0000
(17:07 +0000)
(I think this will also fail with high load.)
p4raw-id: //depot/perl@12458
ext/Time/HiRes/HiRes.t
patch
|
blob
|
history
diff --git
a/ext/Time/HiRes/HiRes.t
b/ext/Time/HiRes/HiRes.t
index
f92cb65
..
a2cb206
100644
(file)
--- a/
ext/Time/HiRes/HiRes.t
+++ b/
ext/Time/HiRes/HiRes.t
@@
-223,7
+223,9
@@
unless (defined &Time::HiRes::setitimer
$SIG{VTALRM} = 'DEFAULT';
}
-print abs(sleep(1) - 1) < 0.001 ? "ok 20\n" : "not ok 20\n";
+$a = abs(sleep(1) - 1);
+print $a < 0.1 ? "ok 20 # $a\n" : "not ok 20 # $a\n";
-print abs(usleep(1000000) / 1000000 - 1) < 0.001 ? "ok 21\n" : "not ok 21\n";
+$a = abs(usleep(1000000) / 1000000 - 1);
+print $a < 0.1 ? "ok 21 # $a\n" : "not ok 21 # $a\n";