Module ROT.Scheduler.Simple
The simple scheduler.
Functions
add (item, repeating) | Add. |
next () | Next. |
getTime () | Get Time. |
clear () | Clear. |
remove (item) | Remove. |
Functions
- 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.Simple
self
- next ()
-
Next.
Get the next item from the scheduler and advance the appropriate amount time
Returns:
-
item or nil
The item previously added by .add() or nil if none are queued
- getTime ()
-
Get Time.
Get time counted since start
Returns:
-
int
elapsed time
- clear ()
-
Clear.
Remove all items from scheduler
Returns:
-
ROT.Scheduler.Simple
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