js不用定时器,很耗时间的代码,用于测试方便(其它语言同理)
for(;;){
if(66 === Math.floor(Math.random() * 300000000)){
console.log(66);
break;
}
}
注意:时间不太可控,慢慢调整,数字大了会卡死
js不用定时器,很耗时间的代码,用于测试方便(其它语言同理)
for(;;){
if(66 === Math.floor(Math.random() * 300000000)){
console.log(66);
break;
}
}
注意:时间不太可控,慢慢调整,数字大了会卡死