killTimer
Shared
Cancels a timer before it ends.
bool killTimer(timer timer)
Parameters
| Name | Type | Description |
|---|---|---|
| timer | timer | The timer, the number setTimer returned. |
Returns
true if the timer was cancelled, false if it does not exist in this resource.
Example
local reminder = setTimer(function()
outputDebugString("still here")
end, 60000, 0)
addCommandHandler("quiet", function()
if isTimer(reminder) then
killTimer(reminder)
end
end)