: : I can't find
sleep() or
: : timeGettime() in minGW's include file and something in my
: : code is rounding DELAY to the nearest half second. I need to find a
: : way to count in smaller bits of seconds
: :
: My mistake--Sleep() and timeGettime() are both in windows.h.
:
: Nontheless, this should work:
:
:
:
: void pause (void) {
:
: clock_t start_time, cur_time;
: start_time = clock();
: while((clock() - start_time) < DELAY * CLOCKS_PER_SEC);
: }
: :
:
: By changing DELAY you can achieve resolution greater then 1 second
: using this code.
:
tank you vary much, your version of pause() worked perfectly and my game is on the verge of being fun!(for a console app game)