code: function _getExpiredTimeouts(time) {
      var i = 0;
      while (i < timeouts.length && ((timeouts[i].time <= time) || !isFinite(timeouts[i].time))) {
        i++;
      }
      var expired = timeouts.splice(0, i);
  
      if (deterministic == false) {
        // the array with expired timeouts is in deterministic order
        // shuffle them
        util.shuffle(expired);
      }
  
      return expired;
    }
docs: Remove all timeouts occurring before or on the provided time from the
  queue and return them.
  @param {number} time    A timestamp
  @returns {Array} returns an array containing all expired timeouts
  @private