Name: Anonymous 2012-09-03 0:27
So, I've been trying to use the sleep function in C, but I have a problem. If I use it once, like, for example:
Then it works just fine. But if I try doing that same thing, so:
It just waits 10 seconds then displays the next two lines at once. Is there some work around for this?
printf("First Line.\n");
sleep(5);
printf("Second Line.");Then it works just fine. But if I try doing that same thing, so:
printf("First Line.\n");
sleep(5);
printf("Second Line.\n");
sleep(5);
printf("Third Line.");It just waits 10 seconds then displays the next two lines at once. Is there some work around for this?