diff options
Diffstat (limited to 'lib/rbot/timer.rb')
-rw-r--r-- | lib/rbot/timer.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rbot/timer.rb b/lib/rbot/timer.rb index 64324b6a..03a4c91e 100644 --- a/lib/rbot/timer.rb +++ b/lib/rbot/timer.rb @@ -78,6 +78,7 @@ module Timer # # add an action to the timer def add(period, data=nil, &func) + debug "adding timer, period #{period}" @handle += 1 @timers[@handle] = Action.new(period, data, &func) start_on_add @@ -90,6 +91,7 @@ module Timer # # add an action to the timer which will be run just once, after +period+ def add_once(period, data=nil, &func) + debug "adding one-off timer, period #{period}" @handle += 1 @timers[@handle] = Action.new(period, data, true, &func) start_on_add @@ -135,6 +137,8 @@ module Timer @next_action_time = timer.in end } + #debug "ticked. now #{@timers.length} timers remain" + #debug "next timer due at #{@next_action_time}" end # for backwards compat - this is a bit primitive |