code: function ()
      {
          var i, thand, since, newList;
  
          // add timed handlers scheduled for addition
          // NOTE: we add before remove in the case a timed handler is
          // added and then deleted before the next _onIdle() call.
          while (this.addTimeds.length > 0) {
              this.timedHandlers.push(this.addTimeds.pop());
          }
  
          // remove timed handlers that have been scheduled for deletion
          while (this.removeTimeds.length > 0) {
              thand = this.removeTimeds.pop();
              i = this.timedHandlers.indexOf(thand);
              if (i >= 0) {
                  this.timedHandlers.splice(i, 1);
              }
          }
  
          // call ready timed handlers
          var now = new Date().getTime();
          newList = [];
          for (i = 0; i < this.timedHandlers.length; i++) {
              thand = this.timedHandlers[i];
              if (this.authenticated || !thand.user) {
                  since = thand.lastCalled + thand.period;
                  if (since - now <= 0) {
                      if (thand.run()) {
                          newList.push(thand);
                      }
                  } else {
                      newList.push(thand);
                  }
              }
          }
          this.timedHandlers = newList;
  
          clearTimeout(this._idleTimeout);
  
          this._proto._onIdle();
  
          // reactivate the timer only if connected
          if (this.connected) {
              this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
          }
      }
docs: PrivateFunction: _onIdle
  _Private_ handler to process events during idle cycle.
  
  This handler is called every 100ms to fire timed handlers that
  are ready and keep poll requests going.