Realizing method and system of software timers

An implementation method and timer technology, applied in the direction of program control devices, etc., can solve the problems of time-consuming and low timing efficiency of timers, and achieve the effects of uniform distribution, improved timing efficiency, and reduced number of scan queues
CN103473071AActive Publication Date: 2013-12-25深圳市路通网络技术有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳市路通网络技术有限公司
Publication Date
2013-12-25

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The embodiment of the invention discloses a realizing method of software timers, wherein the timers are managed in a manner of double-array and multi-queue; a timer queue which the timers belong to is determined according to the timing length of the timers and a current timing moment, so that the timers are distributed uniformly, and the phenomenon that a certain timer queue is too long is unlikely to occur; in addition, only two timer queues are scanned at a certain timing moment to judge whether the timer reaches the timing length, the queue scanning number is reduced, so that the timing efficiency of the timers is improved. The embodiment of the invention also provides a realizing system of the software timers.
Need to check novelty before this filing date? Find Prior Art

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...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More