﻿function Timer()
{
    this.start(Settings.FPS);
}


Timer.prototype.dispatch = function()
{
    EventCenter.broadcast(Events.ENTER_FRAME, "foo");
}

Timer.prototype.pause = function()
{
    clearInterval(this.interval);
}

Timer.prototype.start = function(rate)
{
    rate = rate || this.rate;
    this.rate = rate;
    this.interval = setInterval("Timer.prototype.dispatch()", 1000/rate)
}
