This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "cpan/Time-HiRes/t/itimer.t: better diagnostics"
authorDavid Mitchell <davem@iabyn.com>
Thu, 21 Aug 2014 15:50:39 +0000 (16:50 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 21 Aug 2014 15:50:39 +0000 (16:50 +0100)
This reverts commit 65dd9533e90d8e1ea84c091ff43133132c667a1c.

That commit was just temporary to help debug a smoke issue.
Since Time::Hires is a CPAN-first module, back the patch out from blead,
and leave it to the module's owner whether they want to add it back in.

cpan/Time-HiRes/t/itimer.t

index 24374cd..a9ef80d 100644 (file)
@@ -43,8 +43,7 @@ note "setitimer: ", join(" ",
 
 # Assume interval timer granularity of $limit * 0.5 seconds.  Too bold?
 my $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL);
 
 # Assume interval timer granularity of $limit * 0.5 seconds.  Too bold?
 my $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL);
-ok defined $virt && abs($virt / 0.5) - 1 < $limit
-   or diag "virt=" . (defined $virt ? $virt : 'undef');
+ok defined $virt && abs($virt / 0.5) - 1 < $limit;
 
 note "getitimer: ", join(" ",
     Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL));
 
 note "getitimer: ", join(" ",
     Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL));
@@ -58,8 +57,7 @@ note "getitimer: ", join(" ",
     Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL));
 
 $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL);
     Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL));
 
 $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL);
-note "at end, i=$i";
-is($virt, 0, "time left should be zero");
+ok defined $virt && $virt == 0;
 
 $SIG{VTALRM} = 'DEFAULT';
 
 
 $SIG{VTALRM} = 'DEFAULT';