jmarrdiaz
6/2/2017 - 8:51 AM

Sleep Javascript

Sleep Javascript

function sleep(milliseconds) {
      var start = new Date().getTime();
      for (var i = 0; i < 1e7; i++) {
        if ((new Date().getTime() - start) > milliseconds){
        break;
        }
      }
    }