_adaptive sleep
This commit is contained in:
@@ -370,6 +370,15 @@ void Win32Platform::SetThreadAffinityMask(uint64 affinityMask)
|
||||
|
||||
void Win32Platform::Sleep(int32 milliseconds)
|
||||
{
|
||||
if (milliseconds < 0)
|
||||
{
|
||||
::SwitchToThread();
|
||||
return;
|
||||
}
|
||||
|
||||
//::Sleep(milliseconds);
|
||||
//return;
|
||||
|
||||
static thread_local HANDLE timer = NULL;
|
||||
if (timer == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user