2
// timer_queue_base.hpp
3
// ~~~~~~~~~~~~~~~~~~~~
5
// Copyright (c) 2003-2008 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 ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
12
#define ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
#include "asio/detail/push_options.hpp"
20
#include "asio/detail/socket_types.hpp" // Must come before posix_time.
22
#include "asio/detail/push_options.hpp"
23
#include <boost/date_time/posix_time/posix_time_types.hpp>
24
#include "asio/detail/pop_options.hpp"
26
#include "asio/detail/noncopyable.hpp"
31
class timer_queue_base
36
virtual ~timer_queue_base() {}
38
// Whether there are no timers in the queue.
39
virtual bool empty() const = 0;
41
// Get the time to wait until the next timer.
42
virtual boost::posix_time::time_duration wait_duration() const = 0;
44
// Dispatch all ready timers.
45
virtual void dispatch_timers() = 0;
47
// Dispatch any pending cancels for timers.
48
virtual void dispatch_cancellations() = 0;
50
// Destroy timers that are waiting to be cleaned up.
51
virtual void cleanup_timers() = 0;
53
// Destroy all timers.
54
virtual void destroy_timers() = 0;
60
#include "asio/detail/pop_options.hpp"
62
#endif // ASIO_DETAIL_TIMER_QUEUE_BASE_HPP