JSRUN 用代码说话
我是大神
llh23
第90585位JSRUN用户

活跃于 2023-12-07 10:44 访问量:2519
关注


#include <iostream> #include <chrono> #include <thread> int main() { std::cout << "延迟输出前的消息" << std::endl; // 设置延迟时间为3秒 std::chrono::seconds delay(3); // 让线程睡眠3秒 std::this_thread::sleep_for(delay); std::cout << "延迟输出后的消息" << std::endl; return 0; }


没有了
1/1
没有了