Nodejs Function Repeat sleep(delay)

Here you can find the source of sleep(delay)

Method Source Code

function sleep(delay){
  var start = new Date().getTime();
  while (new Date().getTime() < start + delay);
}

Related

  1. repeat(interval)
    Function.prototype.repeat = function(interval){
      return setInterval(this, interval);
    };