gre.timer clear timeout

gre.timer_clear_timeout(
    id
)
		    

This function stops an existing timer from firing

Parameters: id The lightuserdata representing the timer Returns: Nothing 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

    data = gre.timer_clear_timeout(idval)
end
            
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.