also do Sys_Sleep for less then 20ms

Sys_Sleep(10) is used quite often throughout the code.
This commit is contained in:
Daniel Gibson 2012-12-30 16:26:24 +01:00
parent 478d7e4f6e
commit a102d9d469

View file

@ -656,6 +656,8 @@ ID_TIME_T Sys_FileTimeStamp( idFileHandle fp )
void Sys_Sleep( int msec ) void Sys_Sleep( int msec )
{ {
#if 0 // DG: I don't really care, this spams the console (and on windows this case isn't handled either)
// Furthermore, there are several Sys_Sleep( 10 ) calls throughout the code
if( msec < 20 ) if( msec < 20 )
{ {
static int last = 0; static int last = 0;
@ -668,7 +670,7 @@ void Sys_Sleep( int msec )
// ignore that sleep call, keep going // ignore that sleep call, keep going
return; return;
} }
#endif // DG end
// use nanosleep? keep sleeping if signal interrupt? // use nanosleep? keep sleeping if signal interrupt?
// RB begin // RB begin