From: Gurusamy Sarathy Date: Mon, 9 Jun 2003 18:00:57 +0000 (+0000) Subject: one of the Net::Ping time-dependent tests fails sporadically X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8eff326bc4ec5cde990026aa3a8ca58f85cb4bbc;p=p5sagit%2Fp5-mst-13.2.git one of the Net::Ping time-dependent tests fails sporadically when the response from localhost is "too quick" p4raw-id: //depot/perl@19723 --- diff --git a/lib/Net/Ping/t/250_ping_hires.t b/lib/Net/Ping/t/250_ping_hires.t index 52dae1b..91e905f 100644 --- a/lib/Net/Ping/t/250_ping_hires.t +++ b/lib/Net/Ping/t/250_ping_hires.t @@ -57,5 +57,7 @@ my ($ret, $duration) = $p -> ping("localhost"); ok $ret; # It is extremely likely that the duration contains a decimal -# point if Time::HiRes is functioning properly. -ok $duration =~ /\./; +# point if Time::HiRes is functioning properly, except when it +# it is fast enough to be "zero". +print "# duration=[$duration]\n"; +ok $duration =~ /\.|^0$/;