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