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_set.hpp 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // detail/timer_queue_set.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_SET_HPP
  11. #define ASIO_DETAIL_TIMER_QUEUE_SET_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/timer_queue_base.hpp"
  17. #include "asio/detail/push_options.hpp"
  18. namespace asio {
  19. namespace detail {
  20. class timer_queue_set
  21. {
  22. public:
  23. // Constructor.
  24. ASIO_DECL timer_queue_set();
  25. // Add a timer queue to the set.
  26. ASIO_DECL void insert(timer_queue_base* q);
  27. // Remove a timer queue from the set.
  28. ASIO_DECL void erase(timer_queue_base* q);
  29. // Determine whether all queues are empty.
  30. ASIO_DECL bool all_empty() const;
  31. // Get the wait duration in milliseconds.
  32. ASIO_DECL long wait_duration_msec(long max_duration) const;
  33. // Get the wait duration in microseconds.
  34. ASIO_DECL long wait_duration_usec(long max_duration) const;
  35. // Dequeue all ready timers.
  36. ASIO_DECL void get_ready_timers(op_queue<operation>& ops);
  37. // Dequeue all timers.
  38. ASIO_DECL void get_all_timers(op_queue<operation>& ops);
  39. private:
  40. timer_queue_base* first_;
  41. };
  42. } // namespace detail
  43. } // namespace asio
  44. #include "asio/detail/pop_options.hpp"
  45. #if defined(ASIO_HEADER_ONLY)
  46. # include "asio/detail/impl/timer_queue_set.ipp"
  47. #endif // defined(ASIO_HEADER_ONLY)
  48. #endif // ASIO_DETAIL_TIMER_QUEUE_SET_HPP