Implementation method for dynamic time duration timer in favor of low power consumption and free of accumulated error

2015 
The invention relates to an implementation method for a dynamic time duration timer in favor of low power consumption and free of accumulated error. The implementation method is characterized in that a relative time cell is the time from the startup of a system to now; a time interrupt service unit is responsible for updating the running time of a software timer; according to the timeout time of a recent software timer, next hardware clock source interrupt generation time is set, and meanwhile, a timer task processing unit is activated; whether a software timer node reaches timing time or not is judged by the timer task processing unit according to the time of a current relative time unit; if the timer exceed the time limit, a timer overtime processing method of a predefined processing unit is executed; whether the software timer is a cycle timer or a non-cycle timer is judged according to timer types, and related operation is executed; a timer management unit is responsible for related initialization, and insertion and deleting operation on a timer node. According to the implementation method disclosed by the invention, time deviation and the accumulated error which are generated by the fact that an interrupt service routine is executed by a CPU (central processing unit) are avoided, so dynamic variable-length timing is realized so as to reduce the power consumption.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []