resetTimer
Compartido
Vuelve a empezar la cuenta de un timer desde cero, con el mismo intervalo. Las repeticiones que faltan no cambian.
bool resetTimer(timer timer)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| timer | timer | El timer, el número que devolvió setTimer. |
Retorno
true si el timer se reinició, false si no existe en este recurso.
Ejemplo
local idle = setTimer(function()
outputDebugString("inactivo durante 5 minutos")
end, 300000, 1)
addEventHandler("onClientKey", root, function()
resetTimer(idle)
end)