1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 17:59:04 +00:00

Reintroduce the time_t local in ScanProgressMeter::printStats; it's needed for

Windows compilation.
This commit is contained in:
david
2009-02-05 01:32:26 +00:00
parent 29460cd95d
commit 02869fd83a

View File

@@ -557,6 +557,7 @@ bool ScanProgressMeter::printStats(double perc_done,
double time_used_s; double time_used_s;
double time_needed_s; double time_needed_s;
double time_left_s; double time_left_s;
time_t timet;
struct tm *ltime; struct tm *ltime;
last_print = *now; last_print = *now;
@@ -586,7 +587,8 @@ bool ScanProgressMeter::printStats(double perc_done,
last_est.tv_sec += time_left_s; last_est.tv_sec += time_left_s;
/* Get the estimated time of day at completion */ /* Get the estimated time of day at completion */
ltime = localtime(&last_est.tv_sec); timet = last_est.tv_sec;
ltime = localtime(&timet);
assert(ltime); assert(ltime);
log_write(LOG_STDOUT, "%s Timing: About %.2f%% done; ETC: %02d:%02d (%.f:%02.f:%02.f remaining)\n", log_write(LOG_STDOUT, "%s Timing: About %.2f%% done; ETC: %02d:%02d (%.f:%02.f:%02.f remaining)\n",