11 #ifndef ASIO_WAIT_TRAITS_HPP 12 #define ASIO_WAIT_TRAITS_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/push_options.hpp" 23 template <
typename Clock>
31 const typename Clock::duration& d)
41 const typename Clock::time_point& t)
43 typename Clock::time_point now = Clock::now();
44 if (now + (Clock::duration::max)() < t)
45 return (Clock::duration::max)();
46 if (now + (Clock::duration::min)() > t)
47 return (Clock::duration::min)();
54 #include "asio/detail/pop_options.hpp" 56 #endif // ASIO_WAIT_TRAITS_HPP static Clock::duration to_wait_duration(const typename Clock::time_point &t)
Convert a clock duration into a duration used for waiting.
Definition: wait_traits.hpp:40
static Clock::duration to_wait_duration(const typename Clock::duration &d)
Convert a clock duration into a duration used for waiting.
Definition: wait_traits.hpp:30
Definition: any_io_executor.hpp:28