Check out example codes for "how to sleep in c". It will help you in understanding the concepts better.

Code Example 1

sleep(5); //sleep for 5 secs

Code Example 2

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
 
int main(){
  
	printf("Sleeping for 5 seconds \n");
	sleep(5);
	printf("Sleep is now over \n");  
}

Learn ReactJs, React Native from akashmittal.com