Module ROT.Scheduler

The Scheduler Prototype

Functions

getTime () Get Time.
add (item, repeating) Add.
getTimeOf (item) Get scheduled time.
clear () Clear.
remove (item) Remove.
next () Next.


Functions

getTime ()
Get Time. Get time counted since start

Returns:

    int elapsed time
add (item, repeating)
Add. Add an item to the schedule

Parameters:

  • item any
  • repeating boolean If true, this item will be rescheduled once it is returned by .next()

Returns:

    ROT.Scheduler self
getTimeOf (item)
Get scheduled time. Get the time the given item is scheduled for

Parameters:

  • item any

Returns:

    number time
clear ()
Clear. Remove all items from scheduler

Returns:

    ROT.Scheduler self
remove (item)
Remove. Find and remove an item from the scheduler

Parameters:

  • item any The previously added item to be removed

Returns:

    boolean true if an item was removed from the scheduler
next ()
Next. Get the next event from the scheduler and advance the appropriate amount time

Returns:

    event or nil The event previously added by .add() or nil if none are queued
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03