Check out example codes for "sleep system function linux c++". It will help you in understanding the concepts better.

Code Example 1

#include <time.h>

int main(int argc, char const *argv[])
{
    sleep(10);	// wait for 10s

    return 0;
}

Learn ReactJs, React Native from akashmittal.com