function try1() {
var t2 = setTimeout('console.time("text")', 1000);
var t3 = setTimeout('console.timeEnd("text")', 2000);
var t1 = setTimeout("try1()", 3000)
}
测试了下发现并不是精准的1000ms
text: 999.081ms
text: 1000.964ms
text: 999.260ms
text: 999.025ms
text: 998.837ms
text: 1000.022ms
是我测试的不对还是js就是如此?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
就是如此。他是有一个队列的。