/******************************************************
* Class Timer                                         *
*                                                     *
* Methods: clear                                      *
*            Input: -                                 *
*            Output: -                                *
*          set                                        *
*            Input: (proc Function, interval Integer) *
*            Output: -                                *
******************************************************/

function Timer()
{
  var timerid;

  this.clear = function()
  {
    window.clearTimeout(timerid);
  };

  this.set = function(proc, interval)
  {
    var me = this;
    proc();
    timerid = window.setTimeout(function() { me.set(proc, interval); }, interval);
  };
}

