, (while (1) { ... }) .
, sleep . sleep, , nanosleep, .
#include <stdio.h>
#include <time.h>
int main()
{
struct timespec t = { 3, 0};
while (1){
printf("Wait three seconds and...\n");
nanosleep(&t,NULL);
fflush(stdout);
}
}
: (\n) outpu, , , , , ( , ). fflush.