Get the time for the timer that is earliest in the queue.
| 131 | |
| 132 | // Get the time for the timer that is earliest in the queue. |
| 133 | virtual long wait_duration_usec(long max_duration) const |
| 134 | { |
| 135 | if (heap_.empty()) |
| 136 | return max_duration; |
| 137 | |
| 138 | return this->to_usec( |
| 139 | Time_Traits::to_posix_duration( |
| 140 | Time_Traits::subtract(heap_[0].time_, Time_Traits::now())), |
| 141 | max_duration); |
| 142 | } |
| 143 | |
| 144 | // Dequeue all timers not later than the current time. |
| 145 | virtual void get_ready_timers(op_queue<operation>& ops) |