mirror of
https://github.com/nmap/nmap.git
synced 2026-10-22 20:01:32 +00:00
Merge the minimum-rate scanning feature (--min-rate) from
/nmap-exp/david/nmap-fixed-rate.
This commit is contained in:
parent
dd220398b1
commit
feab94ebd3
8 changed files with 351 additions and 14 deletions
4
utils.h
4
utils.h
|
|
@ -175,8 +175,8 @@
|
|||
#define TIMEVAL_SEC_SUBTRACT(a,b) ((a).tv_sec - (b).tv_sec + (((a).tv_usec < (b).tv_usec) ? - 1 : 0))
|
||||
|
||||
/* assign one timeval to another timeval plus some msecs: a = b + msecs */
|
||||
#define TIMEVAL_MSEC_ADD(a, b, msecs) (a).tv_sec = (b).tv_sec + ((msecs) / 1000); (a).tv_usec = (b).tv_usec + ((msecs) % 1000) * 1000; (a).tv_sec += (a).tv_usec / 1000000; (a).tv_usec %= 1000000
|
||||
#define TIMEVAL_ADD(a, b, usecs) (a).tv_sec = (b).tv_sec + ((usecs) / 1000000); (a).tv_usec = (b).tv_usec + ((usecs) % 1000000); (a).tv_sec += (a).tv_usec / 1000000; (a).tv_usec %= 1000000
|
||||
#define TIMEVAL_MSEC_ADD(a, b, msecs) { (a).tv_sec = (b).tv_sec + ((msecs) / 1000); (a).tv_usec = (b).tv_usec + ((msecs) % 1000) * 1000; (a).tv_sec += (a).tv_usec / 1000000; (a).tv_usec %= 1000000; }
|
||||
#define TIMEVAL_ADD(a, b, usecs) { (a).tv_sec = (b).tv_sec + ((usecs) / 1000000); (a).tv_usec = (b).tv_usec + ((usecs) % 1000000); (a).tv_sec += (a).tv_usec / 1000000; (a).tv_usec %= 1000000; }
|
||||
|
||||
/* Return num if it is between min and max. Otherwise return min or
|
||||
max (whichever is closest to num), */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue