Example of sleep function
The sleep function can be structured with a program.As you suggested above from the members and experts,It stops the execution of the program for a specified time interval.
Here,a code is shown which stops the execution of the program for 1 second -
printf("This is Msg_1 \n");
sleep(1000); //1000 microsecond= 1 second will sleep...
printf("This is Msg_2 after 1 second.......");