7#include "awaitable.hpp"
13namespace hi::inline
v1 {
15class awaitable_timer {
17 template<
typename Duration>
20 template<
typename Rep,
typename Period>
23 [[nodiscard]]
bool await_ready()
const noexcept
25 return std::chrono::utc_clock::now() > _deadline;
28 void await_suspend(std::coroutine_handle<> handle)
noexcept;
30 void await_resume()
const noexcept {}
33 utc_nanoseconds _deadline;
41template<
typename Rep,
typename Period>
45 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
55template<
typename Duration>
59 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition utility.hpp:29
DOXYGEN BUG.
Definition algorithm.hpp:13
A functor for casting a type to an awaitable.
Definition awaitable.hpp:57
Definition awaitable_timer.hpp:15