Jerry D. Hedden [Sun, 1 Jul 2007 15:23:37 +0000 (11:23 -0400)]
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <
1ff86f510707011223u7557fc53m9df980815479892a@mail.gmail.com>
p4raw-id: //depot/perl@31517
}
}
-use Test;
+use Test qw(plan ok $TESTERR);
use Net::Ping;
plan tests => 8;
# It is extremely likely that the duration contains a decimal
# point if Time::HiRes is functioning properly, except when it
-# it is fast enough to be "zero".
-print "# duration=[$duration]\n";
-ok $duration =~ /\.|^0$/;
+# is fast enough to be "0", or slow enough to be exactly "1".
+if (! ok($duration =~ /\.|^[01]$/)) {
+ print($TESTERR "# duration=[$duration]\n");
+}