Chris@16: // Chris@16: // detail/timer_queue_set.hpp Chris@16: // ~~~~~~~~~~~~~~~~~~~~~~~~~~ Chris@16: // Chris@101: // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: #ifndef BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP Chris@16: #define BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP Chris@16: Chris@16: #if defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: # pragma once Chris@16: #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace asio { Chris@16: namespace detail { Chris@16: Chris@16: class timer_queue_set Chris@16: { Chris@16: public: Chris@16: // Constructor. Chris@16: BOOST_ASIO_DECL timer_queue_set(); Chris@16: Chris@16: // Add a timer queue to the set. Chris@16: BOOST_ASIO_DECL void insert(timer_queue_base* q); Chris@16: Chris@16: // Remove a timer queue from the set. Chris@16: BOOST_ASIO_DECL void erase(timer_queue_base* q); Chris@16: Chris@16: // Determine whether all queues are empty. Chris@16: BOOST_ASIO_DECL bool all_empty() const; Chris@16: Chris@16: // Get the wait duration in milliseconds. Chris@16: BOOST_ASIO_DECL long wait_duration_msec(long max_duration) const; Chris@16: Chris@16: // Get the wait duration in microseconds. Chris@16: BOOST_ASIO_DECL long wait_duration_usec(long max_duration) const; Chris@16: Chris@16: // Dequeue all ready timers. Chris@16: BOOST_ASIO_DECL void get_ready_timers(op_queue& ops); Chris@16: Chris@16: // Dequeue all timers. Chris@16: BOOST_ASIO_DECL void get_all_timers(op_queue& ops); Chris@16: Chris@16: private: Chris@16: timer_queue_base* first_; Chris@16: }; Chris@16: Chris@16: } // namespace detail Chris@16: } // namespace asio Chris@16: } // namespace boost Chris@16: Chris@16: #include Chris@16: Chris@16: #if defined(BOOST_ASIO_HEADER_ONLY) Chris@16: # include Chris@16: #endif // defined(BOOST_ASIO_HEADER_ONLY) Chris@16: Chris@16: #endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP