mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid showing the sending rate in bytes per second if no sent bytes have been
recorded. This applies during a TCP connect scan, where we have a count of packets sent but not of bytes (which we cannot measure, and will vary from platform to platform).
This commit is contained in:
2
timing.h
2
timing.h
@@ -142,6 +142,8 @@ class RateMeter {
|
||||
double getCurrentPacketRate(const struct timeval *now = NULL, bool update =true);
|
||||
double getOverallByteRate(const struct timeval *now = NULL) const;
|
||||
double getCurrentByteRate(const struct timeval *now = NULL, bool update =true);
|
||||
unsigned long long getNumPackets(void) const;
|
||||
unsigned long long getNumBytes(void) const;
|
||||
|
||||
private:
|
||||
/* How many seconds to look back when calculating the "current" rates. */
|
||||
|
||||
Reference in New Issue
Block a user