Check out example codes for "wait function in c". It will help you in understanding the concepts better.

Code Example 1

sleep(/*How many seconds do you want to wait*/);

Learn ReactJs, React Native from akashmittal.com