diff options
author | Stephane Payrard <properler@freesurf.fr> | 2000-01-24 17:15:38 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-01-24 14:14:23 +0000 |
commit | 1ac4a978d1dfb6f1f4abe73e0845e644769e4a6e (patch) | |
tree | e7f5062c9a71fc4a0c621c6a3829a0ad4ec64c3d /lib/Benchmark.pm | |
parent | 52d4d313461135b86a50bfed75724925d4fb6248 (diff) | |
download | perl-1ac4a978d1dfb6f1f4abe73e0845e644769e4a6e.tar.gz |
<patch> avoid division by 0 in Benchmark.pm
To: Gurusamy Sarathy <gsar@ActiveState.com>
Cc: perl5-porters@perl.org
Message-ID: <20000124161538.A995@freesurf.fr>
p4raw-id: //depot/cfgperl@4880
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r-- | lib/Benchmark.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 487ddd5717..7cb78eb56e 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 $n; + $s .= sprintf(" @ %$f/s (n=$n)", $n / ( $pu + $ps )) if $pu + $ps; $s; } |