摘要
本文通过对定时器原理的分析,结合队列数据结构和网络协议中“时间戳”的概念,提出了一种新的、较完善的多任务处理环境下的定时器应用算法,并且给出了主要程序的流程框图。该算法具有较高的效率和可靠性,其时间复杂度及空间复杂度均为O(n)。
Mter analyzing the working principle of timer and with the help of the concepts of queue (Data Structure) and time stamp (Computer Network), the article gives a new algorithm to solve problems in the applications of timer under multitasking. The flow charts of some main programs are also provided in the article. The algorithm has a efficient space and time complexity, which are both at O(n).
出处
《现代计算机》
2007年第1期100-102,共3页
Modern Computer