From 4f0cfaab9376ce059a18b0d6754cd937e8484e7a Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 20 Jan 2013 21:57:14 +0000 Subject: [PATCH] change param order for timer --- 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 432ea1f..76f7aef 100644 --- a/modules/timers/timers.js +++ b/modules/timers/timers.js @@ -10,14 +10,14 @@ var timers = function(dbot) { this.runningIntervals = []; this.api = { - 'addTimer': function(callback, timeout, firstDate) { + 'addTimer': function(timeout, callback, firstDate) { var now = new Date().getTime(); if(firstDate) { console.log('Setting first timer to run at ' + firstDate); firstTimeout = firstDate.getTime() - now; setTimeout(function(callback) { console.log('Running first timer at ' + new Date().toUTCString()); - this.runningIntervals.push(this.api.addTimer(callback, timeout)); + this.runningIntervals.push(this.api.addTimer(timeout, callback)); callback(); }.bind(this), firstTimeout); } else {