gre.timer_clear_timeout
gre.timer_clear_timeout(
id
)
This function stops an existing timer from firing
Parameters
| Parameter | Type | Description |
|---|---|---|
id | #userdata | The lightuserdata representing the timer |
Example
local idval = {}
function cb_func()
print("CB FUNC HAS BEEN CALLED")
end
--Call cb_func after 5 seconds
function cb_set_timeout()
idval = gre.timer_set_timeout(cb_func, 2000)
end
function cb_clear_timeout()
local data = gre.timer_clear_timeout(idval)
end