World.addTask

Registers a task.

  1. size_t addTask(void delegate() task, size_t interval, size_t repeat)
    class World
    size_t
    addTask
    (
    void delegate
    ()
    task
    ,
    size_t interval
    ,
    size_t repeat = size_t.max
    )
  2. alias schedule = addTask

Parameters

task void delegate
()

a delegate of a function that will be called every interval

interval size_t

number of ticks indicating between the calls

repeat size_t

number of times to repeat the task

Return Value

Type: size_t

the new task id that can be used to remove the task

Meta