timer_queue_ptime.ipp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // detail/impl/timer_queue_ptime.ipp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2013 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 BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
  11. #define BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #include <boost/asio/detail/timer_queue_ptime.hpp>
  17. #include <boost/asio/detail/push_options.hpp>
  18. #if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
  19. namespace boost {
  20. namespace asio {
  21. namespace detail {
  22. timer_queue<time_traits<boost::posix_time::ptime> >::timer_queue()
  23. {
  24. }
  25. timer_queue<time_traits<boost::posix_time::ptime> >::~timer_queue()
  26. {
  27. }
  28. bool timer_queue<time_traits<boost::posix_time::ptime> >::enqueue_timer(
  29. const time_type& time, per_timer_data& timer, wait_op* op)
  30. {
  31. return impl_.enqueue_timer(time, timer, op);
  32. }
  33. bool timer_queue<time_traits<boost::posix_time::ptime> >::empty() const
  34. {
  35. return impl_.empty();
  36. }
  37. long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_msec(
  38. long max_duration) const
  39. {
  40. return impl_.wait_duration_msec(max_duration);
  41. }
  42. long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_usec(
  43. long max_duration) const
  44. {
  45. return impl_.wait_duration_usec(max_duration);
  46. }
  47. void timer_queue<time_traits<boost::posix_time::ptime> >::get_ready_timers(
  48. op_queue<operation>& ops)
  49. {
  50. impl_.get_ready_timers(ops);
  51. }
  52. void timer_queue<time_traits<boost::posix_time::ptime> >::get_all_timers(
  53. op_queue<operation>& ops)
  54. {
  55. impl_.get_all_timers(ops);
  56. }
  57. std::size_t timer_queue<time_traits<boost::posix_time::ptime> >::cancel_timer(
  58. per_timer_data& timer, op_queue<operation>& ops, std::size_t max_cancelled)
  59. {
  60. return impl_.cancel_timer(timer, ops, max_cancelled);
  61. }
  62. } // namespace detail
  63. } // namespace asio
  64. } // namespace boost
  65. #endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
  66. #include <boost/asio/detail/pop_options.hpp>
  67. #endif // BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP