想知道nextTick在一秒内的触发频率,下面的代码正确吗
var fireCount = 0; var start = new Date; while(new Date - start < 1000){ process.nextTick(function(){fireCount++;}); } setTimeout(function(){console.log(fireCount);}, 1000);