Class | Timer::Action |
In: |
lib/rbot/timer.rb
|
Parent: | Object |
class representing individual timed action
next | [RW] | Time when the Action should be called next |
Options are:
start: | Time when the Action should be run for the first time. Repeatable Actions will be repeated after that, see :period. One-time Actions will not (obviously) Default: Time.now + :period |
period: | How often repeatable Action should be run, in seconds. Default: 1 |
blocked: | if true, Action starts as blocked (i.e. will stay dormant until unblocked) |
args: | Arguments to pass to the Action callback. Default: [] |
repeat: | Should the Action be called repeatedly? Default: false |
code: | You can specify the Action body using &block, or using this option. |