Answers for "how to time sleep in c++"

C++
3

how to use sleep function in c++ windows

// to use sleep function on windows with c++
#include <Windows.h>
Sleep(3000) // based on milliseconds
Posted by: Guest on September-10-2021
0

c++ sleep

#include <chrono>
#include <thread>

//sleeping for 3 milliseconds
sleep(3000)
Posted by: Guest on February-14-2022
0

c++ sleep

std::this_thread::sleep_for(std::chrono::milliseconds(x));
Posted by: Guest on February-22-2022

Browse Popular Code Answers by Language