]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/detail/timer_queue_set.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / asio / detail / timer_queue_set.hpp
1 //
2 // detail/timer_queue_set.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
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)
9 //
10
11 #ifndef BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
12 #define BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19 #include <boost/asio/detail/timer_queue_base.hpp>
20
21 #include <boost/asio/detail/push_options.hpp>
22
23 namespace boost {
24 namespace asio {
25 namespace detail {
26
27 class timer_queue_set
28 {
29 public:
30 // Constructor.
31 BOOST_ASIO_DECL timer_queue_set();
32
33 // Add a timer queue to the set.
34 BOOST_ASIO_DECL void insert(timer_queue_base* q);
35
36 // Remove a timer queue from the set.
37 BOOST_ASIO_DECL void erase(timer_queue_base* q);
38
39 // Determine whether all queues are empty.
40 BOOST_ASIO_DECL bool all_empty() const;
41
42 // Get the wait duration in milliseconds.
43 BOOST_ASIO_DECL long wait_duration_msec(long max_duration) const;
44
45 // Get the wait duration in microseconds.
46 BOOST_ASIO_DECL long wait_duration_usec(long max_duration) const;
47
48 // Dequeue all ready timers.
49 BOOST_ASIO_DECL void get_ready_timers(op_queue<operation>& ops);
50
51 // Dequeue all timers.
52 BOOST_ASIO_DECL void get_all_timers(op_queue<operation>& ops);
53
54 private:
55 timer_queue_base* first_;
56 };
57
58 } // namespace detail
59 } // namespace asio
60 } // namespace boost
61
62 #include <boost/asio/detail/pop_options.hpp>
63
64 #if defined(BOOST_ASIO_HEADER_ONLY)
65 # include <boost/asio/detail/impl/timer_queue_set.ipp>
66 #endif // defined(BOOST_ASIO_HEADER_ONLY)
67
68 #endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP