Sandbox: Lua: Timer - ov-studio/Vital.sandbox GitHub Wiki
━ What's the Objective?
Timer are useful when you've to repeat specific handler at some specified interval for n
times; However, by default Lua doesn't offer timers out of the box.
━ APIs
━ timer:getType() (Shared)
@Objective: Retrieve's instance's type.
local string: type = self:getType()
━ timer:create() (Shared)
@Objective: Creates a new timer.
local timer: cTimer = timer:create(
function: exec,
int: interval,
int: executions,
~: ...arguments
)
━ timer:destroy() (Shared)
@Objective: Destroys an existing timer.
local bool: result = self:destroy()