Dequeue all timers not later than the current time.
| 143 | |
| 144 | // Dequeue all timers not later than the current time. |
| 145 | virtual void get_ready_timers(op_queue<operation>& ops) |
| 146 | { |
| 147 | if (!heap_.empty()) |
| 148 | { |
| 149 | const time_type now = Time_Traits::now(); |
| 150 | while (!heap_.empty() && !Time_Traits::less_than(now, heap_[0].time_)) |
| 151 | { |
| 152 | per_timer_data* timer = heap_[0].timer_; |
| 153 | ops.push(timer->op_queue_); |
| 154 | remove_timer(*timer); |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | // Dequeue all timers. |
| 160 | virtual void get_all_timers(op_queue<operation>& ops) |