3#include <yaclib_std/chrono>
5#if YACLIB_FAULT_THIS_THREAD == 2
10template <
typename Clock,
typename Duration>
11inline void sleep_until(
const std::chrono::time_point<Clock, Duration>& sleep_time) {
12 std::uint64_t timeout = std::chrono::duration_cast<std::chrono::nanoseconds>(sleep_time.time_since_epoch()).count();
16template <
typename Rep,
typename Period>
17void sleep_for(
const std::chrono::duration<Rep, Period>& sleep_duration) {
18 sleep_until(yaclib_std::chrono::steady_clock::now() + sleep_duration);
33using std::this_thread::sleep_for;
35using std::this_thread::sleep_until;
37using std::this_thread::yield;
39using std::this_thread::get_id;
static detail::fiber::FiberBase::Id GetId()
static void RescheduleCurrent()
static Scheduler * GetScheduler() noexcept
void Sleep(std::uint64_t ns)