2 // detail/timer_queue_set.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2016 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_TIMER_QUEUE_SET_HPP
12 #define BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
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_base.hpp>
21 #include <boost/asio/detail/push_options.hpp>
31 BOOST_ASIO_DECL timer_queue_set();
33 // Add a timer queue to the set.
34 BOOST_ASIO_DECL void insert(timer_queue_base* q);
36 // Remove a timer queue from the set.
37 BOOST_ASIO_DECL void erase(timer_queue_base* q);
39 // Determine whether all queues are empty.
40 BOOST_ASIO_DECL bool all_empty() const;
42 // Get the wait duration in milliseconds.
43 BOOST_ASIO_DECL long wait_duration_msec(long max_duration) const;
45 // Get the wait duration in microseconds.
46 BOOST_ASIO_DECL long wait_duration_usec(long max_duration) const;
48 // Dequeue all ready timers.
49 BOOST_ASIO_DECL void get_ready_timers(op_queue<operation>& ops);
51 // Dequeue all timers.
52 BOOST_ASIO_DECL void get_all_timers(op_queue<operation>& ops);
55 timer_queue_base* first_;
62 #include <boost/asio/detail/pop_options.hpp>
64 #if defined(BOOST_ASIO_HEADER_ONLY)
65 # include <boost/asio/detail/impl/timer_queue_set.ipp>
66 #endif // defined(BOOST_ASIO_HEADER_ONLY)
68 #endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP