util.timer.next_tick
Shared
Schedules a function to execute on the next engine tick
Syntax
local status = util.timer.next_tick(exec)Parameters
| Type | Name | Description |
|---|---|---|
function | exec | Function to execute on the next engine tick |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true if the callback was successfully scheduled, false otherwise |
util.resource.start("my_resource")
util.timer.next_tick(function()
core.engine.print("info", "Resource running?:", util.resource.is_running("my_resource"))
end)