Return Time Alive
t = tools.alive( [dp] )
Returns time alive with high/variable precision.
Parameter | Type | Description |
---|---|---|
dp |
number | Precision. Default = 0.001 (milliseconds) |
Returns | Type | Description |
---|---|---|
t |
number | Number of seconds alive, including fraction. |
e.g.
local us = tools.alive(0.000001) -- microseconds
local ms = tools.alive(0.001) -- milliseconds
local s = tools.alive(1) -- seconds, rounded up