summaryrefslogtreecommitdiff
path: root/lib/Benchmark.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-01-28 09:03:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-01-28 09:03:37 +0000
commitcc31225e4d4aa42bdd0b59e2f2e27664df411220 (patch)
tree074d988efc469d73cb36848c94415468f2aef8bc /lib/Benchmark.pm
parentb3d54cb9acd163a80dc5132ec7edd0cb2c446e2b (diff)
downloadperl-cc31225e4d4aa42bdd0b59e2f2e27664df411220.tar.gz
The #4880 was too eager, the $n test is useful too.
p4raw-id: //depot/cfgperl@4918
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r--lib/Benchmark.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm
index 7cb78eb56e..f9ade27bc5 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;
}