From c86af959b92aef9a96bf64d58c7a61fd067fabb3 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 19 Oct 2019 23:42:17 +0000 Subject: [PATCH] Add optional duration parameter to idle() git-svn-id: https://svn.eduke32.com/eduke32@8149 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/include/winlayer.h --- source/build/include/sdlayer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/build/include/sdlayer.h b/source/build/include/sdlayer.h index 4bf12c25d..ae2cfe792 100644 --- a/source/build/include/sdlayer.h +++ b/source/build/include/sdlayer.h @@ -90,12 +90,12 @@ static inline void idle_waitevent(void) SDL_WaitEvent(NULL); } -static inline void idle(void) +static inline void idle(int const msec = 1) { #ifndef _WIN32 - usleep(1000); + usleep(msec * 1000); #else - Sleep(1); + Sleep(msec); #endif }