This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid DIVZERO
authorGurusamy Sarathy <gsar@cpan.org>
Mon, 26 Jul 1999 13:28:46 +0000 (13:28 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 26 Jul 1999 13:28:46 +0000 (13:28 +0000)
p4raw-id: //depot/perl@3778

utils/dprofpp.PL

index 0c57940..ba099c0 100644 (file)
@@ -437,6 +437,8 @@ Main: {
 #
 sub settime {
   my( $runtime, $hz ) = @_;
+
+  $hz ||= 1;
   
   if( $opt_r ){
     $$runtime = ($rrun_rtime - $overhead - $over_rtime * $total_marks/$over_tests/2)/$hz;