function Timer(timeout, callback) {
	this.timeout = timeout;
	this.callback = callback;
	this.timer = null;
}

Timer.prototype.start = function() {
	this.timer = setTimeout(this.callback, this.timeout);
}

Timer.prototype.stop = function() {
	clearTimeout(this.timer);
}

Timer.prototype.restart = function() {
	this.stop();
	this.start();
}

Timer.prototype.setCallback = function(callback) {
	this.callback = callback;
}
