code: function( minInterval, output ) {
  			var scheduled,
  				lastOutput = 0;
  
  			function triggerOutput() {
  				lastOutput = ( new Date() ).getTime();
  				scheduled = false;
  				output();
  			}
  
  			return {
  				input: function() {
  					if ( scheduled )
  						return;
  
  					var diff = ( new Date() ).getTime() - lastOutput;
  
  					// If less than minInterval passed after last check,
  					// schedule next for minInterval after previous one.
  					if ( diff < minInterval )
  						scheduled = setTimeout( triggerOutput, minInterval - diff );
  					else
  						triggerOutput();
  				},
  
  				reset: function() {
  					if ( scheduled )
  						clearTimeout( scheduled );
  
  					scheduled = lastOutput = 0;
  				}
  			};
  		}
docs: Buffers `input` events (or any `input` calls)
  and triggers `output` not more often than once per `minInterval`.
  
  var buffer = CKEDITOR.tools.eventsBuffer( 200, function() {
  console.log( 'foo!' );
  } );
  
  buffer.input();
  // 'foo!' logged immediately.
  buffer.input();
  // Nothing logged.
  buffer.input();
  // Nothing logged.
  // ... after 200ms a single 'foo!' will be logged.
  
  Can be easily used with events:
  
  var buffer = CKEDITOR.tools.eventsBuffer( 200, function() {
  console.log( 'foo!' );
  } );
  
  editor.on( 'key', buffer.input );
  // Note: There is no need to bind buffer as a context.
  
  @since 4.2.1
  @param {Number} minInterval Minimum interval between `output` calls in milliseconds.
  @param {Function} output Function that will be executed as `output`.
  @returns {Object}
  @returns {Function} return.input Buffer's input method.
  @returns {Function} return.reset Resets buffered events &mdash; `output` will not be executed
  until next `input` is triggered.