- Documentation
- Shared functions
- getTimerDetails
Function
getTimerDetails
Returns the time until the timer's next call, the number of remaining repeats and the interval.
Syntax
int, int, int getTimerDetails(timer timer)Arguments
timertimer- A timer from
setTimer.
Returns
Remaining ms, remaining repeats (0 = endless), interval in ms; false if the timer does not exist.
Example
local t = setTimer(function() end, 5000, 3)
local left, repeats, interval = getTimerDetails(t)
print(left, repeats, interval) -- ok. 5000, 3, 5000