Advertisement
pneave

sleep() current thread for # seconds

May 1st, 2021
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.14 KB | None | 0 0
  1. #include <thread>
  2. #include <chrono>
  3.  
  4. void sleep(const size_t seconds)
  5. {
  6.     std::this_thread::sleep_for(std::chrono::seconds(seconds));
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement