|  Developer
Updated on November 23, 2021

reset

  • Reset a timer previously established by calling set_timeout or set_interval. Passing an invalid ID to restart() silently does nothing; no exception is thrown.
Edit
Edit
fields type description
delay number New delay for the timer. The time, in milliseconds (thousandths of a second). Note that the actual delay may be longer
timer_id string The identifier of the timer desired to restart
Edit
fields type description
none
Edit
				
					-- module.lua

local timer = require("timer")

local timer_id = timer.set_interval(1000, "HUB:handler", { arg_name = "arg_value" })

timer.reset(2500, timer_id)