[英]Use Javascript Timer in Node.Js Script to fire an event at certain time
I have 40 or more timer in my Node script (a timer for per connection) to count time and call a function when it's finished. 我的Node脚本中有40个或更多的计时器(每个连接一个计时器),用于计算时间并在完成时调用一个函数。 For another job, i want call a function at 23:59;
对于另一项工作,我想在23:59调用一个函数; so i have two solution:
所以我有两个解决方案:
Which is more logical? 哪个更合乎逻辑? Is there another solution?
还有其他解决方案吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.