this.Timer = Class.create({
  delay:null,
  callback:null,
  interval:null,
  time:0,
  
  initialize: function( delay, callback )
  {
    this.delay = delay;
    this.callback = callback;
    this.time = 0;
    this.interval = null;
  },
  
  start: function()
  {
    clearInterval( this.interval );
    this.interval = setInterval( delegate( this, this.tick ), this.delay );
  },
  
  pause: function()
  {
    clearInterval( this.interval );
  },
  
  stop: function()
  {
    this.time = 0;
    clearInterval( this.interval );
  },
  
  tick: function()
  {
    this.time += this.delay;
    this.callback();
  }
  
});

