debounce function with delay.
@param {number} [delay=100]
@param {Object} [options={}]
@return {any}
961630
function Debounce(delay=100, options={}) {
    return function(target, key, descriptor) {
        let fn = descriptor.value;

        descriptor.value = debounce(fn, delay, options);

        return descriptor;
    };
}
174543
def backoff_delays(start, stop, factor=2.0, jitter=False):
    
    cur = start
    while cur <= stop:
        if jitter:
            yield cur - (cur * random.random())
        else:
            yield cur
        cur = cur * factor
1324107
function setDeferredTimeout(deferred, delay) {
        var timer = setTimeout(function () {
            deferred.reject("timeout");
        }, delay);
        deferred.always(function () { clearTimeout(timer); });
    }
368036
function(func, wait, options) {
      var leading = true,
          trailing = true;

      if (options === false) {
        leading = false;
      } else if ($$.is.plainObject(options)) {
        leading = 'leading' in options ? options.leading : leading;
        trailing = 'trailing' in options ? options.trailing : trailing;
      }
      options = options || {};
      options.leading = leading;
      options.maxWait = wait;
      options.trailing = trailing;

      return $$.util.debounce(func, wait, options);
    }
548731
def _delay(self, ms):
        
        if ms:
            self.Delay(ms)
        else:
            if self.default_delay:
                self.Delay(self.default_delay)
684012
function debounce (fn) {
  let calling = null
  let latestArgs = null
  return (...args) => {
    latestArgs = args
    if (!calling) {
      calling = Promise.resolve().then(() => {
        calling = null
        // At this point `args` may be different from the most
        // recent state, if multiple calls happened since this task
        // was queued. So we use the `latestArgs`, which definitely
        // is the most recent call.
        return fn(...latestArgs)
      })
    }
    return calling
  }
}
38801
async function pause() {
  if (gT.cLParams.selActsDelay) {
    await gT.u.promise.delayed(gT.cLParams.selActsDelay);
  }
}
182524
function debounce(delay, fn) {
	let timer;
	return function() {
		let args = arguments;
		if(timer) {
			clearTimeout(timer);
			timer = null;
		}
		timer = setTimeout(_ => {
			fn.apply(null, args);
			timer = null;
		}, delay);
	};
}
730014
function debounce(fn, delay) {
        return function () {
          var self = this, args = arguments;
          clearTimeout(timer);
          console.log('debounce()');
          timer = setTimeout(function () {
            fn.apply(self, args);
          }, delay);
        };
      }
984392
function(delay) {
			if(this.isTurnedOff){
				return;
			}
			if (this.isShowing()) { //$NON-NLS-0$
				return;
			}
			if (this._timeout) {
				window.clearTimeout(this._timeout);
				this._timeout = null;
			}
			var showDelay = delay !== undefined ? delay : this._showDelay;
			if (showDelay) {
				this._timeout = window.setTimeout(this._showImmediately.bind(this), showDelay);	
			} else {
				this._showImmediately();
			}
		}
483988
function(value, silent) {
			var events = silent ? [] : ['change'];
	
			debounce_events(this, events, function() {
				this.clear();
				this.addItems(value, silent);
			});
		}
1210634
function(callback, delay, repetitions) {
  var x = 0;
  var intervalID = setInterval(function () {
    if (++x === repetitions) {
      clearInterval(intervalID);
      receive_interval_timer = false;
    }
    callback();
  }, delay);
  return intervalID;
}
749172
function Debounce(delay=300, options={leading: true, trailing: false}) {
    let d = (methodDescriptor, args)=>{
        let {descriptor} = methodDescriptor;

        let fn = descriptor.value;
        descriptor.value = debounce(fn, ...args);

        return {
            ...methodDescriptor,
            descriptor,
        };
    };

    if (typeof delay === 'object') {
        d(delay, [300, {leading: true, trailing: false}]);
    } else {
        return (m)=>d(m, [delay, options]);
    }
}
245080
def delay(self, seconds=0, minutes=0):
        

        minutes += int(seconds / 60)
        seconds = seconds % 60
        seconds += float(minutes * 60)

        self.robot.pause()
        if not self.robot.is_simulating():
            _sleep(seconds)
        self.robot.resume()

        return self
1069189
function deflateRaw(input, options) {
  options = options || {};
  options.raw = true;
  return deflate(input, options);
}
51950
function throttle(f, delay) {
  var timeoutId;
  var previous = 0;

  return function throttleExecute_() {
    var args = arguments;
    var now = +(new Date());
    var remaining = delay - (now - previous);

    if (remaining <= 0) {
      clearTimeout(timeoutId);
      timeoutId = null;
      previous = now;

      f.apply(null, args);
    } else if (!timeoutId) {
      timeoutId = setTimeout(function() {
        previous = +(new Date());
        timeoutId = null;

        f.apply(null, args);
      }, remaining);
    }
  };
}
195929
function debounce (callback, wait, options) {
  var args, context
  var opts = options || {}
  var runFlag = false
  var timeout = 0
  var isLeading = typeof options === 'boolean'
  var optLeading = 'leading' in opts ? opts.leading : isLeading
  var optTrailing = 'trailing' in opts ? opts.trailing : !isLeading
  var clearTimeoutFn = clearTimeout
  var runFn = function () {
    runFlag = true
    timeout = 0
    callback.apply(context, args)
  }
  var endFn = function () {
    if (optLeading === true) {
      timeout = 0
    }
    if (!runFlag && optTrailing === true) {
      runFn()
    }
  }
  var cancelFn = function () {
    var rest = timeout !== 0
    clearTimeoutFn(timeout)
    timeout = 0
    return rest
  }
  var debounced = function () {
    runFlag = false
    args = arguments
    context = this
    if (timeout === 0) {
      if (optLeading === true) {
        runFn()
      }
    } else {
      clearTimeoutFn(timeout)
    }
    timeout = setTimeout(endFn, wait)
  }
  debounced.cancel = cancelFn
  return debounced
}