摘要 |
A system and method for timer windows is provided. A mechanism is provided for managing actions that need to be started within a specified interval. By exploiting windows of acceptable times for events, timer expirations can be grouped and processed in batches to improve the throughput of the system. For one embodiment, an event is associated with a timer object, which has start and end times that specify an interval during which the associated event should be started. A pair of priority queues prioritizes timers by earliest start times and earliest end times. These times are compared with the current time, and corresponding timers are retired from the queue until the timer at the front of the queue has a start time that is later than the current time.
|