17 [[nodiscard]]
constexpr bool await_ready() const noexcept {
return false; }
30template <
typename Rep,
typename Period>
39 std::this_thread::sleep_for(
duration);
47template <
typename Rep,
typename Period>
48[[nodiscard]]
inline auto delay(
const std::chrono::duration<Rep, Period>& d)
noexcept {
Definition AsyncEvent.hpp:14
constexpr YieldAwaiter yield() noexcept
Helper to yield execution in a coroutine.
Definition Delay.hpp:25
auto delay(const std::chrono::duration< Rep, Period > &d) noexcept
Helper to suspend coroutine for a given std::chrono duration.
Definition Delay.hpp:48
Awaitable that pauses the coroutine thread for the specified duration.
Definition Delay.hpp:31
std::chrono::duration< Rep, Period > duration
Definition Delay.hpp:32
constexpr bool await_ready() const noexcept
Definition Delay.hpp:34
constexpr void await_resume() const noexcept
Definition Delay.hpp:43
void await_suspend(std::coroutine_handle<> handle) const
Definition Delay.hpp:38
Awaitable that yields control back to the caller/event loop once.
Definition Delay.hpp:16
constexpr void await_resume() const noexcept
Definition Delay.hpp:21
void await_suspend(std::coroutine_handle<> handle) const noexcept
Definition Delay.hpp:18
constexpr bool await_ready() const noexcept
Definition Delay.hpp:17