17 future_t<> sleep_until_(std::chrono::system_clock::time_point tp_, scheduler_t& scheduler_);
25 inline future_t<> sleep_for_(std::chrono::system_clock::duration dt_, scheduler_t& scheduler_)
27 return sleep_until_(std::chrono::system_clock::now() + dt_, scheduler_);
36 template<
class _Rep,
class _Period>
37 inline future_t<> sleep_for(std::chrono::duration<_Rep, _Period> dt_, scheduler_t& scheduler_)
39 return sleep_for_(std::chrono::duration_cast<std::chrono::system_clock::duration>(dt_), scheduler_);
48 template<
class _Clock,
class _Duration =
typename _Clock::duration>
49 inline future_t<> sleep_until(std::chrono::time_point<_Clock, _Duration> tp_, scheduler_t& scheduler_)
51 return sleep_until_(std::chrono::time_point_cast<std::chrono::system_clock::duration>(tp_), scheduler_);
60 template<
class _Rep,
class _Period>
61 inline future_t<> sleep_for(std::chrono::duration<_Rep, _Period> dt_)
63 scheduler_t* sch = current_scheduler();
64 co_await sleep_for_(std::chrono::duration_cast<std::chrono::system_clock::duration>(dt_), *sch);
73 template<
class _Clock,
class _Duration>
74 inline future_t<> sleep_until(std::chrono::time_point<_Clock, _Duration> tp_)
76 scheduler_t* sch = current_scheduler();
77 co_await sleep_until_(std::chrono::time_point_cast<std::chrono::system_clock::duration>(tp_), *sch);
86 template <
class Rep,
class Period>
87 inline future_t<>
operator co_await(std::chrono::duration<Rep, Period> dt_)
89 scheduler_t* sch = current_scheduler();
90 co_await sleep_for(dt_, *sch);