timer_get_duration - kemonologic/fuwafuwa GitHub Wiki

timer_get_duration(timer)

Returns: (real) The duration of the timer, in the timer's units.

Argument Type Name Desc
0 map timer The timer to check.

Returns time remaining until the end of the timer, in the timer's units.

Please note that a timer's duration is changed every time a timer is unpaused to make sure the timer has run for the originally set duration, and this function will reflect that. For example, a timer set for 5 seconds, run for 2.5 seconds, then paused will return a duration of 5 when this function is run, but when the same timer is unpaused will return a duration of 2.5, since that was the remaining time left to be run.