From bd75519047fc907be620e3695bb8bf7258cc51fd Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 27 Jan 2013 14:49:22 +0000 Subject: [PATCH] callback fix for [#233] --- modules/timers/timers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/timers/timers.js b/modules/timers/timers.js index 76f7aef..f70a576 100644 --- a/modules/timers/timers.js +++ b/modules/timers/timers.js @@ -15,13 +15,13 @@ var timers = function(dbot) { if(firstDate) { console.log('Setting first timer to run at ' + firstDate); firstTimeout = firstDate.getTime() - now; - setTimeout(function(callback) { + setTimeout(function() { console.log('Running first timer at ' + new Date().toUTCString()); this.runningIntervals.push(this.api.addTimer(timeout, callback)); callback(); }.bind(this), firstTimeout); } else { - this.runningIntervals.push(setInterval(function(callback) { + this.runningIntervals.push(setInterval(function() { console.log('Running subsequent timer at ' + new Date().toUTCString()); callback(); }.bind(this), timeout));