Files
cuberite-2a/source/cSleep.cpp
T

20 lines
330 B
C++
Raw Normal View History

2011-10-03 18:41:19 +00:00
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#ifndef _WIN32
#include <unistd.h>
2011-10-03 18:41:19 +00:00
#endif
2011-10-03 18:41:19 +00:00
void cSleep::MilliSleep( unsigned int a_MilliSeconds )
{
#ifdef _WIN32
Sleep(a_MilliSeconds); // Don't tick too much
#else
usleep(a_MilliSeconds*1000);
#endif
}