mirror of
https://github.com/nmap/nmap.git
synced 2026-01-06 14:39:03 +00:00
Add nmap.clock() for providing scripts with the current time in floating
point seconds since the epoch, and add clock_ms() and clock_us() to stdnse for convenience (millisecond and microsecond). qscan.nse now provides microsecond resolution.
This commit is contained in:
@@ -146,6 +146,12 @@ function set_port_state(host, port, state)
|
||||
-- <code>"tcpwrapped"</code>, or <code>"incomplete"</code>.
|
||||
function set_port_version(host, port, probestate)
|
||||
|
||||
--- Returns the current date and time in seconds.
|
||||
-- @return The number of seconds since the epoch (on most systems this is
|
||||
-- 01/01/1970) as a floating point value.
|
||||
-- @usage local now = nmap.clock()
|
||||
function clock()
|
||||
|
||||
--- Returns the current date and time in milliseconds.
|
||||
-- @return The number of milliseconds since the epoch (on most systems this is
|
||||
-- 01/01/1970).
|
||||
|
||||
Reference in New Issue
Block a user