code: function Timer(opts) {
  
    opts = defaults(opts || {}, defaultOptions);
  
    this._duration = opts.duration;
  
    this._startTime = null;
  
    this._handle = null;
  
    this._check = this._check.bind(this);
  
  }
docs: Signals a timeout.
  @event Timer#timeout
   
  @class Timer
  @classdesc
  
  A Timer provides a mechanism to receive an event after a timeout.
  
  A timer has a set duration, and is either started or stopped at a given time.
  The timer is initially stopped. When the timer is started, a timeout event is
  scheduled to fire once the set duration elapses. When the timer is stopped,
  the scheduled timeout event is cancelled. When a timeout event fires, the
  timer returns to the stopped state.
  
  @param {number} [opts.duration=Infinity] Timeout in milliseconds.