Provides timed task execution.
Executes a function repeatedly.
Returns: intervalId
local id = scheduler:setInterval(function()
print("tick")
end, 5000)Stops a running interval.
scheduler:clearInterval(id)Executes a function once after a delay.
Returns: timeoutId
scheduler:setTimeout(function()
print("Executed once after delay")
end, 2000)