process.nextTick的问题

想知道nextTick在一秒内的触发频率,下面的代码正确吗

   var fireCount = 0;
  var start = new Date;
  while(new Date - start < 1000){
  process.nextTick(function(){fireCount++;});
 }
 setTimeout(function(){console.log(fireCount);}, 1000);
收藏 0分享浏览 2961
10年前
跟帖
暂无
说几句
广告位 点击查看投放指南

友情链接 大搜车前端团队博客
我的收藏