diff --git a/misc/maintenance/touch_all_biblios.pl b/misc/maintenance/touch_all_biblios.pl index d0910899ba..b6a5addf38 100755 --- a/misc/maintenance/touch_all_biblios.pl +++ b/misc/maintenance/touch_all_biblios.pl @@ -99,7 +99,7 @@ my $endtime = time(); my $time = $endtime-$startime; my $accuracy = ($goodcount / $totalcount) * 100; # this is a percentage my $averagetime = 0; -unless ($time == 0) { $averagetime = $totalcount / $time; }; +$averagetime = $time / $totalcount if $totalcount; print "Good: $goodcount, Bad: $badcount (of $totalcount) in $time seconds\n"; printf "Accuracy: %.2f%%\nAverage time per record: %.6f seconds\n", $accuracy, $averagetime if (defined $verbose); diff --git a/misc/maintenance/touch_all_items.pl b/misc/maintenance/touch_all_items.pl index fdbce5c936..64c70e37e6 100755 --- a/misc/maintenance/touch_all_items.pl +++ b/misc/maintenance/touch_all_items.pl @@ -98,7 +98,7 @@ my $endtime = time(); my $time = $endtime-$startime; my $accuracy = ($goodcount / $totalcount) * 100; # this is a percentage my $averagetime = 0; -unless ($time == 0) {$averagetime = $totalcount / $time;}; +$averagetime = $time / $totalcount if $totalcount; print "Good: $goodcount, Bad: $badcount (of $totalcount) in $time seconds\n"; printf "Accuracy: %.2f%%\nAverage time per record: %.6f seconds\n", $accuracy, $averagetime if (defined $verbose);