Schedules a one-shot timer to execute a function after a delay.
| Name | Type | Description |
|---|---|---|
ticks | number | Delay in ticks (20 ticks = 1 second). |
handler | function | Called as function(task). |
A task handle.
after(100, function(task)
server.broadcast('Five seconds have passed.')
end)
task:cancel() on the returned handle to cancel it. Tasks are also removed when their plugin is unloaded.