From 1ea0135dc825246dd4726aad8766a5555cb5f0b1 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 23 Apr 2008 22:42:41 +0000 Subject: [PATCH] Fix printStatusMessage to show the correct elapsed time after 24 minutes. Part of what printStatusMessage does is display the total elapsed time. The code looked like this: log_write(LOG_STDOUT, "Stats: %d:%02d:%02d elapsed; %d hosts completed (%d up), %d undergoing %s\n", time/60/24, time/60 % 24, time % 60, o.numhosts_scanned - o.numhosts_scanning, o.numhosts_up, o.numhosts_scanning, scantype2str(o.current_scantype)); where time is the number of seconds since the program started. However, this code acts as though each hour has only 24 minutes. That is, after 0:23:59 it would become 1:00:00. This commit changes the 24s to 60s to make it work right. --- output.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output.cc b/output.cc index ca206f892..fed6999e3 100644 --- a/output.cc +++ b/output.cc @@ -1824,7 +1824,7 @@ void printStatusMessage() { log_write(LOG_STDOUT, "Stats: %d:%02d:%02d elapsed; %d hosts completed (%d up), %d undergoing %s\n", - time/60/24, time/60 % 24, time % 60, o.numhosts_scanned - o.numhosts_scanning, + time/60/60, time/60 % 60, time % 60, o.numhosts_scanned - o.numhosts_scanning, o.numhosts_up, o.numhosts_scanning, scantype2str(o.current_scantype)); }