From: Jarkko Hietaniemi Date: Fri, 28 Jan 2000 09:03:37 +0000 (+0000) Subject: The #4880 was too eager, the $n test is useful too. X-Git-Tag: accepted/trunk/20130322.191538~34817^2~433 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc31225e4d4aa42bdd0b59e2f2e27664df411220;p=platform%2Fupstream%2Fperl.git The #4880 was too eager, the $n test is useful too. p4raw-id: //depot/cfgperl@4918 --- diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 7cb78eb..f9ade27 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -435,7 +435,7 @@ sub timestr { $r,$pu,$ps,$pt) if $style eq 'noc'; $s=sprintf("%2d wallclock secs (%$f cusr + %$f csys = %$f CPU)", $r,$cu,$cs,$ct) if $style eq 'nop'; - $s .= sprintf(" @ %$f/s (n=$n)", $n / ( $pu + $ps )) if $pu + $ps; + $s .= sprintf(" @ %$f/s (n=$n)", $n / ( $pu + $ps )) if $n && $pu+$ps; $s; }