mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Refactor HSS::nextTimeout for efficiency
Avoid function call in macro expansion. Reduce number of struct timeval assignments.
This commit is contained in:
@@ -391,10 +391,10 @@ public:
|
||||
true. */
|
||||
bool sendOK(struct timeval *when) const;
|
||||
|
||||
/* If there are pending probe timeouts, fills in when with the time of
|
||||
the earliest one and returns true. Otherwise returns false and
|
||||
puts now in when. */
|
||||
bool nextTimeout(struct timeval *when) const;
|
||||
/* If there are pending probe timeouts, compares the earliest one with `when`;
|
||||
if it is earlier than `when`, replaces `when` with the time of
|
||||
the earliest one and returns true. Otherwise returns false. */
|
||||
bool soonerTimeout(struct timeval *when) const;
|
||||
UltraScanInfo *USI; /* The USI which contains this HSS */
|
||||
|
||||
/* Removes a probe from probes_outstanding, adjusts HSS and USS
|
||||
|
||||
Reference in New Issue
Block a user