using sleep c++ linux code example
Example 1: sleep in c++ linux
#include <unistd.h>
sleep(10);
Example 2: sleep system function linux c++
#include <time.h>
int main(int argc, char const *argv[])
{
sleep(10); // wait for 10s
return 0;
}