试试这段代码就知道了: function test() { var s = +new Date(); function step() {var n = +new Date(); console.log(n - s); s = n;} setInterval(step, 0); }
试试这段代码就知道了: