Is there some kind of time delay function available? Thanks.
Is there some kind of time delay function available? Thanks.
there is,
just include <windows.h>
and then you can use Sleep(x);
where x is the number of milliseconds and Sleep must be capitalized.
if its for a non windows o/s i think you can use _sleep(x) defined in conio.h
Monday - what a way to spend a seventh of your life
I think this can be done without recourse to anything but the standard libraries
void delay(time_t d)
{
time_t start;
time(&start);
while( time(NULL) < start+d);
}
you will have to
#include <time.h> in the above code .