如果你看到一个文件,得到改变每20 -30秒左右,只是调查你的事件循环的变化,用一个定时器来确保你不太经常的调查。
If you're watching a single file that gets changed every 20-30 seconds or so, just poll for changes in your event loop, with a timer to make sure you don't poll too often.
其基本方法是将循环工作分解到定时器序列中。
The basic approach is to split up the loop's work into a series of timers.
如果你已经尝试了第四章介绍的循环优化技术,但还是不能缩减足够的运行时间,那么定时器就是你的下一个优化步骤。
If you've already tried the loop optimization techniques presented in Chapter 4 but haven't been able to reduce the execution time enough, then timers are your next optimization step.
当循环指针移动到某个位置,该位置所对应的链表上的所有定时器超时。
When a circular pointer moved to a certain position, all timers in the corresponding link had already expired.
第四章通过对多队列算法的不足分析,设计了单循环队列定时器算法并和多队列算法比较得出测试结果。
In chapter 4 the timer management algorithms of single circular queue is designed by analysis of shortcomings of multiple queues.
第四章通过对多队列算法的不足分析,设计了单循环队列定时器算法并和多队列算法比较得出测试结果。
In chapter 4 the timer management algorithms of single circular queue is designed by analysis of shortcomings of multiple queues.
应用推荐