how to sleep in c
snippet in c

how to sleep in c

user1056

#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");  
}

sleep in c

user8540

sleep(5); //sleep for 5 secs