7#include "../coroutine/module.hpp"
8#include "../time/module.hpp"
9#include "../macros.hpp"
14hi_export_module(hikogui.dispatch.awaitable_timer : intf);
20 template<
typename Duration>
23 template<
typename Rep,
typename Period>
26 [[nodiscard]]
bool await_ready()
const noexcept
28 return std::chrono::utc_clock::now() > _deadline;
31 void await_suspend(std::coroutine_handle<> handle)
noexcept;
33 void await_resume()
const noexcept {}
36 utc_nanoseconds _deadline;
44template<
typename Rep,
typename Period>
48 [[nodiscard]]
type operator()(
auto&& rhs)
const noexcept
58template<
typename Duration>
62 [[nodiscard]]
type operator()(
auto&& rhs)
const noexcept
DOXYGEN BUG.
Definition algorithm.hpp:16
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
A functor for casting a type to an awaitable.
Definition awaitable.hpp:60
Definition awaitable_timer_intf.hpp:18