diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-24 23:13:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-24 23:13:05 +0000 |
commit | 7be077a223af977e8b405c397059e6785e6fe310 (patch) | |
tree | 4e5a3e570d4093e34e86f3d2b120598e33d9f713 /lib/Benchmark.pm | |
parent | 05423cc9de6f6e1f80405901832793163e71bb76 (diff) | |
download | perl-7be077a223af977e8b405c397059e6785e6fe310.tar.gz |
[win32] tweak Benchmark.pm to restore old timestr() behavior--show wall secs
p4raw-id: //depot/win32/perl@1032
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r-- | lib/Benchmark.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index fe77dd0a61..920968d01d 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -295,12 +295,12 @@ sub timestr { $style ||= $defaultstyle; $style = ($ct>0) ? 'all' : 'noc' if $style eq 'auto'; my $s = "@t $style"; # default for unknown style - $s=sprintf("%2d wallclock secs (%$f usr %$f sys + %$f cusr %$f csys = %$f CPU secs)", + $s=sprintf("%2d wallclock secs (%$f usr %$f sys + %$f cusr %$f csys = %$f CPU)", @t,$t) if $style eq 'all'; - $s=sprintf("%$f CPU secs (%$f usr + %$f sys)", - $pt,$pu,$ps) if $style eq 'noc'; - $s=sprintf("%$f CPU secs (%$f cusr %$f csys)", - $ct,$cu,$cs) if $style eq 'nop'; + $s=sprintf("%2d wallclock secs (%$f usr + %$f sys = %$f CPU)", + $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; } |