Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

timer_queue_base.hpp 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // detail/timer_queue_base.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2015 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. #ifndef ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
  11. #define ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #include "asio/detail/noncopyable.hpp"
  17. #include "asio/detail/op_queue.hpp"
  18. #include "asio/detail/operation.hpp"
  19. #include "asio/detail/push_options.hpp"
  20. namespace asio {
  21. namespace detail {
  22. class timer_queue_base
  23. : private noncopyable
  24. {
  25. public:
  26. // Constructor.
  27. timer_queue_base() : next_(0) {}
  28. // Destructor.
  29. virtual ~timer_queue_base() {}
  30. // Whether there are no timers in the queue.
  31. virtual bool empty() const = 0;
  32. // Get the time to wait until the next timer.
  33. virtual long wait_duration_msec(long max_duration) const = 0;
  34. // Get the time to wait until the next timer.
  35. virtual long wait_duration_usec(long max_duration) const = 0;
  36. // Dequeue all ready timers.
  37. virtual void get_ready_timers(op_queue<operation>& ops) = 0;
  38. // Dequeue all timers.
  39. virtual void get_all_timers(op_queue<operation>& ops) = 0;
  40. private:
  41. friend class timer_queue_set;
  42. // Next timer queue in the set.
  43. timer_queue_base* next_;
  44. };
  45. template <typename Time_Traits>
  46. class timer_queue;
  47. } // namespace detail
  48. } // namespace asio
  49. #include "asio/detail/pop_options.hpp"
  50. #endif // ASIO_DETAIL_TIMER_QUEUE_BASE_HPP