self:destroy

Shared

Destroys the timer instance and frees its resources


Syntax

local status = self:destroy()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Destroy a timer instance
local entity = util.timer.create(function(count)
    core.engine.print("info", "Tick: "..core.engine.get_tick())
end, 500, 0)

entity:destroy()

On this page