function Timer(handler, interval) {
this.handler = handler;
this.interval = interval;
this.__proto__.start = function () {
this.timer = setInterval(this.handler, this.interval);
};
this.__proto__.stop = function () {
clearInterval(this.timer);
delete this.timer;
};
}
function Timer(handler, interval) {
this.handler = handler;
this.interval = interval;
this.start = function () {
this.timer = setInterval(this.handler, this.interval);
};
this.stop = function () {
clearInterval(this.timer);
delete this.timer;
};
}