use the clock() function like this
#include <time.h>
int main()
{
//Following code stops program for 3 seconds put
//command after the while loop not in the {}
clock_t start_time;
start_time = clock();
while((clock() - start_ time) < 3 * CLOCKS_PER_SEC)
{
}...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.