varorderTimeOut=900000;vartimer=setInterval(()=>{orderTimeOut-=10;if(orderTimeOut>10){times=overTime(orderTimeOut);console.log(times)}else{orderTimeOut=0;times="00:00:00";}},10);functionoverTime(time){vara=(time%1000).toString().substr(0,2);varb=Math.floor(time/1000);varm=b%60;m=String(m);m=m.length>=2?m:"0"+m;varf=Math.floor(time/(1000*60));f=String(f);f=f.length>=2?f:"0"+f;returnf+":"+m+"."+a;}這段方法能夠正常進行倒計時,但是觀察到,它似乎越跑越慢.....
我的這段js倒計時為什么越走越慢?
慕桂英3389331
2019-05-21 09:54:37