Clock tick interrupt configuration method and apparatus
Abstract:
A method and an apparatus for setting a time for a tick interrupt are disclosed. The method includes performing a compensation for a system time when a tick interrupt is executed; setting a time of a next tick interrupt according to a timeout task and a compensated system time if the timeout task exists when the tick interrupt is executed; and when a system enters into a low power mode after the tick interrupt is executed, correcting the time of the next tick interrupt according to the timeout task that is updated when the low power mode is entered. The present disclosure can decouple logic relationships between tick interrupts and Idle tasks, thereby reduces the number of division operations that involve rounding, reduces such accumulated error associated with compensation time, and improves the accuracy of the system time, as compared to the existing technologies.
Information query
Patent Agency Ranking
0/0