むしろjavascriptでゲーム作ろうぜ

このエントリーをはてなブックマークに追加
585名前は開発中のものです。
俺はこうだな

var timer,theday;
var wtime=0;

window.onload = function(){
clearTimeout(timer);
for(;;){
theday=new Date();
if(theday.getTime()-wtime>17)break;
};
wtime=theday.getTime();
timerid=setTimeout("ruup()",15);
//処理
};

setTimeoutがいい加減だから短めにとって予定時間まで空ループ