1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Avoid recalculating timeval that doesn't change for life of RateMeter

This commit is contained in:
dmiller
2024-06-26 21:54:28 +00:00
parent 7b20a38099
commit ba249b2d65
2 changed files with 9 additions and 5 deletions

View File

@@ -183,6 +183,8 @@ class RateMeter {
struct timeval stop_tv;
/* The last time the current sample rates were updated. */
struct timeval last_update_tv;
/* The time current_rate_history after start_tv. */
struct timeval history_threshold;
double total;
double current_rate;