#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");
}
void sleep(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock())
;
}
void sleep(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock())
;
}
#ifdef __unix__
# include <unistd.h>
#elif defined _WIN32
# include <windows.h>
#define sleep(x) Sleep(1000 * (x))
#endif