code: function flushCacheTimed(stream, onFlush) {
      var nextWrite = lastWrite + settings.time;
      var now = Date.now();
  
      // we are overdue for a write, so write now
      if (now >= nextWrite) {
        flushCache(stream);
        onFlush();
  
        return;
      }
  
      // write after the remainder between now and when
      // the next write should be according to milliseconds
      // and the previous write
      timeout = setTimeout(function () {
        flushCache(stream);
        onFlush();
      }, nextWrite - now);
    }
docs: @private
  @description
  Flushes the cache using the defined timeout.
  
  @param {Stream} stream    - The stream to write to.
  @param {Function} onFlush - The function to call when
  the cache is flushed.
  @returns {undefined}