Get elapsed milliseconds since script start (get_elapsed_ms)
Declaration
ms = get_elapsed_ms()
Returns
- ms
Number. Elapsed runtime of the script in milliseconds.
Notes
Returns the elapsed milliseconds for the current script. Paused time is not counted.
Available in versions after 2025-05-11.
Example
local tm = get_elapsed_ms()
sys.msleep(1)
tm = get_elapsed_ms() - tm
nLog('sys.msleep(1) took '..tm..' ms')