function Timer(t,r){"[object Function]"===Object.prototype.toString.call(r)&&(r=[r]),this.callbacks=r;var n=this;setInterval(function e(){if(n.running){for(var t=0;t<n.callbacks.length;t++)n.callbacks[t].call(n);n.count++}},t);Timer.all.push(this)}Timer.prototype.running=!0,Timer.prototype.count=0,Timer.prototype.pause=function pause(){return this.running=!1,this},Timer.prototype.run=function run(){return this.running=!0,this},Timer.prototype.stop=function stop(){return clearInterval(this.id),this.stopped=!0,this},Timer.prototype.id=function id(){return this.id},Timer.prototype.delay=function delay(){return this.delay},Timer.all=[],Timer.all.pause=function pause(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].pause();return t},Timer.all.run=function run(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].run();return t},Timer.all.stop=function stop(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].stop();return t};