I need some help with delay functions,
First off, I know about windows.h, and the sleep(x) function.
But I can't use windows.h because it conflicts with my allegro.h causing my compiler to spew out errors from allegro.h everywhere.
Is there another function that i could use (Other than having to write out over 9000! loops to get the delay)?
Shinedevil
8
Junior Poster in Training
Recommended Answers
Jump to PostTry using the <ctime> library:
http://www.cplusplus.com/reference/clibrary/ctime/time/code for a 3 second delay:
time_t start_time, cur_time; time(&start_time); do { time(&cur_time); } while((cur_time - start_time) < 3);
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.