Javascriptのsleep関数
130 ワード
function sleep(time){
for( var temp = Date.now(); Date.now() - temp <= time;);
}
sleep(1000); //
function sleep(time){
for( var temp = Date.now(); Date.now() - temp <= time;);
}
sleep(1000); //