function throttle(callback, delay) {
    var previousCall = new Date().getTime();
    return function() {
      var time = new Date().getTime();

      if ((time - previousCall) >= delay) {
        previousCall = time;
        callback.apply(null, arguments);
      }
    };
  }
function throttle(callback, delay) {
    var previousCall = new Date().getTime();
    return function() {
      var time = new Date().getTime();

      if ((time - previousCall) >= delay) {
        previousCall = time;
        callback.apply(null, arguments);
      }
    };
  }
function throttle ( callback , delay ) { var previousCall = new Date ( ) . getTime ( ) ; return function ( ) { var time = new Date ( ) . getTime ( ) ; if ( ( time - previousCall ) >= delay ) { previousCall = time ; callback . apply ( null , arguments ) ; } } ; }
limit the number of events per second
limit the number of events per second
Throttles a function to be called every delay milliseconds