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
This commit is contained in:
terminx 2019-10-19 23:42:17 +00:00 committed by Christoph Oelckers
parent a649130327
commit c86af959b9

View file

@ -90,12 +90,12 @@ static inline void idle_waitevent(void)
SDL_WaitEvent(NULL); SDL_WaitEvent(NULL);
} }
static inline void idle(void) static inline void idle(int const msec = 1)
{ {
#ifndef _WIN32 #ifndef _WIN32
usleep(1000); usleep(msec * 1000);
#else #else
Sleep(1); Sleep(msec);
#endif #endif
} }