2 // detail/impl/timer_queue_set.ipp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP
12 #define BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
19 #include <boost/asio/detail/timer_queue_set.hpp>
21 #include <boost/asio/detail/push_options.hpp>
27 timer_queue_set::timer_queue_set()
32 void timer_queue_set::insert(timer_queue_base* q)
38 void timer_queue_set::erase(timer_queue_base* q)
49 for (timer_queue_base* p = first_; p->next_; p = p->next_)
61 bool timer_queue_set::all_empty() const
63 for (timer_queue_base* p = first_; p; p = p->next_)
69 long timer_queue_set::wait_duration_msec(long max_duration) const
71 long min_duration = max_duration;
72 for (timer_queue_base* p = first_; p; p = p->next_)
73 min_duration = p->wait_duration_msec(min_duration);
77 long timer_queue_set::wait_duration_usec(long max_duration) const
79 long min_duration = max_duration;
80 for (timer_queue_base* p = first_; p; p = p->next_)
81 min_duration = p->wait_duration_usec(min_duration);
85 void timer_queue_set::get_ready_timers(op_queue<operation>& ops)
87 for (timer_queue_base* p = first_; p; p = p->next_)
88 p->get_ready_timers(ops);
91 void timer_queue_set::get_all_timers(op_queue<operation>& ops)
93 for (timer_queue_base* p = first_; p; p = p->next_)
94 p->get_all_timers(ops);
101 #include <boost/asio/detail/pop_options.hpp>
103 #endif // BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP