Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:43:12

0001 //
0002 // detail/timer_queue_set.hpp
0003 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 
0011 #ifndef BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
0012 #define BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
0013 
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
0017 
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/detail/timer_queue_base.hpp>
0020 
0021 #include <boost/asio/detail/push_options.hpp>
0022 
0023 namespace boost {
0024 namespace asio {
0025 namespace detail {
0026 
0027 class timer_queue_set
0028 {
0029 public:
0030   // Constructor.
0031   BOOST_ASIO_DECL timer_queue_set();
0032 
0033   // Add a timer queue to the set.
0034   BOOST_ASIO_DECL void insert(timer_queue_base* q);
0035 
0036   // Remove a timer queue from the set.
0037   BOOST_ASIO_DECL void erase(timer_queue_base* q);
0038 
0039   // Determine whether all queues are empty.
0040   BOOST_ASIO_DECL bool all_empty() const;
0041 
0042   // Get the wait duration in milliseconds.
0043   BOOST_ASIO_DECL long wait_duration_msec(long max_duration) const;
0044 
0045   // Get the wait duration in microseconds.
0046   BOOST_ASIO_DECL long wait_duration_usec(long max_duration) const;
0047 
0048   // Dequeue all ready timers.
0049   BOOST_ASIO_DECL void get_ready_timers(op_queue<operation>& ops);
0050 
0051   // Dequeue all timers.
0052   BOOST_ASIO_DECL void get_all_timers(op_queue<operation>& ops);
0053 
0054 private:
0055   timer_queue_base* first_;
0056 };
0057 
0058 } // namespace detail
0059 } // namespace asio
0060 } // namespace boost
0061 
0062 #include <boost/asio/detail/pop_options.hpp>
0063 
0064 #if defined(BOOST_ASIO_HEADER_ONLY)
0065 # include <boost/asio/detail/impl/timer_queue_set.ipp>
0066 #endif // defined(BOOST_ASIO_HEADER_ONLY)
0067 
0068 #endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP