首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::this_thread::sleep_until

Defined in header <thread>

?

?

template< class Clock, class Duration > void sleep_until( const std::chrono::time_point<Clock,Duration>& sleep_time );

?

(since C++11)

阻止当前线程的执行,直到指定为止。sleep_time已经联系到了。

钟系在sleep_time使用,这意味着考虑到时钟的调整。因此,块的持续时间可能小于或超过sleep_time - Clock::now()在呼叫时,取决于调整的方向。该函数也可能阻塞时间超过之后。sleep_time由于调度或资源争用延迟已到达。

参数

sleep_time

-

time to block until

返回值

%280%29

例外

引发的任何异常ClockDuration由标准库提供的%28时钟和持续时间从不抛出%29。

另见

sleep_for (C++11)

stops the execution of the current thread for a specified time duration (function)

C文件[医]睡眠

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com