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

Problem in ext/Time/HiRest/HiRes.t

Thread Next
From:
Arthur Bergman
Date:
August 31, 2001 03:13
Subject:
Problem in ext/Time/HiRest/HiRes.t
Message ID:
B7B52FE4.3708%arthur@contiller.se

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)

-- 
Arthur


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About