X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=dbc0b3072d24eda9f839f44221f980ed79b196ce;hp=d57b83807a249e6cb9c339ae0a3d4803fedda5e1;hb=cb528019c5229698c6e4af7998c34bc45cb6b124;hpb=c8020d330cab48d59515e0e3b7e2f856630ef80b diff --git a/src/libgame/misc.c b/src/libgame/misc.c index d57b8380..dbc0b307 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -357,25 +357,7 @@ unsigned int Counter() /* get milliseconds since last call of InitCounter() */ static void sleep_milliseconds(unsigned int milliseconds_delay) { - boolean do_busy_waiting = (milliseconds_delay < 5 ? TRUE : FALSE); - - if (do_busy_waiting) - { - /* we want to wait only a few ms -- if we assume that we have a - kernel timer resolution of 10 ms, we would wait far too long; - therefore it's better to do a short interval of busy waiting - to get our sleeping time more accurate */ - - unsigned int base_counter = Counter(), actual_counter = Counter(); - - while (actual_counter < base_counter + milliseconds_delay && - actual_counter >= base_counter) - actual_counter = Counter(); - } - else - { - SDL_Delay(milliseconds_delay); - } + SDL_Delay(milliseconds_delay); } void Delay(unsigned int delay) /* Sleep specified number of milliseconds */