19class awaitable_timer {
21 awaitable_timer(awaitable_timer &&)
noexcept =
default;
22 awaitable_timer &operator=(awaitable_timer &&)
noexcept =
default;
24 awaitable_timer(awaitable_timer
const &other) noexcept : _deadline(other._deadline) {}
26 awaitable_timer &operator=(awaitable_timer
const &other)
noexcept
29 _deadline = other._deadline;
33 template<
typename Duration>
38 template<
typename Rep,
typename Period>
43 [[nodiscard]]
bool await_ready()
const noexcept
45 return std::chrono::utc_clock::now() > _deadline;
48 void await_suspend(std::coroutine_handle<> handle)
noexcept;
50 void await_resume()
const noexcept {}
53 utc_nanoseconds _deadline;
54 callback<void()> _callback;