isTimer
Compartilhado
Diz se um timer ainda existe neste recurso.
bool isTimer(timer timer)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
| timer | timer | O timer, o número que setTimer devolveu. |
Retorno
true se o timer existe, false se terminou, foi cancelado ou nunca existiu.
Exemplo
local countdown = setTimer(function()
outputDebugString("go")
end, 5000, 1)
addCommandHandler("abort", function()
if isTimer(countdown) then
killTimer(countdown)
end
end)