Fix report on time executed (fix bug#7)

- The time reported was wrong in a misguided attempt to round.
This commit is contained in:
David A. Wheeler 2014-07-12 12:07:24 -04:00
parent dca1931902
commit e95f94db75
1 changed files with 3 additions and 3 deletions

View File

@ -1793,9 +1793,9 @@ def show_final_results():
time_analyzing = time.time() - starttime time_analyzing = time.time() - starttime
print "Lines analyzed = %d" % sumlines, print "Lines analyzed = %d" % sumlines,
if time_analyzing > 0 and not omit_time: # Avoid divide-by-zero. if time_analyzing > 0 and not omit_time: # Avoid divide-by-zero.
print "in %.2f seconds (%d lines/second)" % ( print "in %.2f seconds (%.0f lines/second)" % (
time_analyzing + 0.5, time_analyzing,
(int) (sumlines / time_analyzing + 0.5) ) (sumlines * 1.0 / time_analyzing) )
else: else:
print print
if output_format: print "<br>" if output_format: print "<br>"