跳到主要内容
CNode

关于process.nextTick触发次数的问题

社区
Jjabez128发布于 13 年前
043200

我想研究1s内process.nextTick的触发次数,下面的代码有没有什么问题:

 var fireCount = 0;
 var start = new Date;
 while(new Date - start < 1000){
  process.nextTick(function(){fireCount++;});
 }
setTimeout(function(){console.log(fireCount);}, 1000);
查看回复

回复 (0)

暂无回复,成为第一个参与讨论的人。

参与回复

登录后即可参与回复。登录