mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Avoid double-printing stats-every in an effort to 'catch up'
This commit is contained in:
parent
dc238cf08b
commit
13c70a9bfd
1 changed files with 3 additions and 2 deletions
|
|
@ -367,9 +367,10 @@ bool keyWasPressed()
|
|||
if (TIMEVAL_AFTER(now, stats_time)) {
|
||||
/* Advance to the next print time. */
|
||||
TIMEVAL_ADD(stats_time, stats_time, (time_t) (o.stats_interval * 1000000));
|
||||
/* If it's still in the past, catch it up to the present. */
|
||||
/* If it's still in the past, catch it up to the present,
|
||||
* plus half a second to avoid double-printing without any progress. */
|
||||
if (TIMEVAL_AFTER(now, stats_time))
|
||||
stats_time = now;
|
||||
TIMEVAL_MSEC_ADD(stats_time, now, 500);
|
||||
printStatusMessage();
|
||||
/* Instruct the caller to print status too. */
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue