develooper Front page | perl.perl5.porters | Postings from August 2001

Problem in ext/Time/HiRest/HiRes.t

Thread Next
Arthur Bergman
August 31, 2001 03:13
Problem in ext/Time/HiRest/HiRes.t
Message ID:

Test 14 is the following.

my $t = time();
my $tf = Time::HiRes::time();
ok 14, (abs($tf - $t) <= 1),
"time $t differs from Time::HiRes::time $tf";

When run this multiple (several thousand) times I end up with the following.
time 999252194 differs from Time::HiRes::time 999252195.000034

I think the intent would be

ok 14, (int($tf - $t) <= 1),
"time $t differs from Time::HiRes::time $tf";

If anyone either opposes this or feels tempted to rewrite the test chime in
or I will change it. (this explains a random failing in the Linux smokes)


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About