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