function sleep(NumMillis) { var nowTime = new Date(); var exitTime = nowTime .getTime() + NumMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } }
function sleep(NumMillis) { var nowTime = new Date(); var exitTime = nowTime .getTime() + NumMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } }