Nodejs Utililty Methods Time Delay

List of utility methods to do Time Delay

Description

The list of methods to do Time Delay are organized into topic(s).

Method

Delay(function)
window.Delay = (function(){
  var timer = 0;
  return function(callback, ms){
    clearTimeout (timer);
    timer = setTimeout(callback, ms);
  };
})();
delay(timeout)
Function.prototype.delay = function(timeout){
  return setTimeout(this, timeout);
};