Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

Latest commit

 

History

History
39 lines (25 loc) · 699 Bytes

File metadata and controls

39 lines (25 loc) · 699 Bytes

scheduler

Provides timed task execution.

scheduler:setInterval(callback, intervalMs)

Executes a function repeatedly.

Returns: intervalId

local id = scheduler:setInterval(function()
    print("tick")
end, 5000)

scheduler:clearInterval(intervalId)

Stops a running interval.

scheduler:clearInterval(id)

scheduler:setTimeout(callback, delayMs)

Executes a function once after a delay.

Returns: timeoutId

scheduler:setTimeout(function()
    print("Executed once after delay")
end, 2000)