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

Re: Problem in ext/Time/HiRest/HiRes.t

Thread Previous | Thread Next
From:
Arthur Bergman
Date:
August 31, 2001 04:19
Subject:
Re: Problem in ext/Time/HiRest/HiRes.t
Message ID:
B7B53F5E.370E%arthur@contiller.se
01-08-31 12.27, skrev John P. Linderman på jpl@research.att.com följande:

> 
> I think it's risky to assume that your process won't get swapped
> out for a second or two between the time() and the Time::HiRes::time().
> Maybe something like
> 
> my $t1 = time();
> my $tf = Time::HiRes::time();
> my $t2 = 1 + time();
> 
> and confirm that ($t1 <= $tf) && ($tf <= $t2)
> 
> One might even try a few iterations, ($t2 - $t1) is greater than 1.
> --jpl

Patches welcome :)

But I agree, infact I think the entire test is a little bogus.

Why not just int($tf - $t) <= 2 ?

-- 
Arthur


Thread Previous | 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