Realizing method and system of software timers
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 深圳市路通网络技术有限公司
- Publication Date
- 2013-12-25
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
Technical field
[0001] The present invention relates to the technical field of timers, and more specifically, to a method and system for implementing a software timer. Background technique
[0002] In the software development process, a large number of timers (ie software timers) need to be used. The function of the timer is to control the time interval at which the software waits for an event to occur. In the implementation, it is necessary to check whether the timer reaches the timing duration. If yes, the corresponding event is triggered. There are two ways to implement common software timers:
[0003] One is a single-queue implementation method. This method uses a queue for timer management and control, that is, the timers are arranged in the order of timing duration from small to large. When a timer is added, it is inserted into The corresponding position of the current queue, although this method is simple to implement, but in the massive timer scenario, the number of timer...