Add Platform::Yield
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
#undef CreateMutex
|
||||
#undef DrawState
|
||||
#undef LoadLibrary
|
||||
#undef Yield
|
||||
#undef GetEnvironmentVariable
|
||||
#undef SetEnvironmentVariable
|
||||
|
||||
|
||||
@@ -400,6 +400,11 @@ void Win32Platform::Sleep(int32 milliseconds)
|
||||
WaitForSingleObject(timer, INFINITE);
|
||||
}
|
||||
|
||||
void Win32Platform::Yield()
|
||||
{
|
||||
SwitchToThread();
|
||||
}
|
||||
|
||||
double Win32Platform::GetTimeSeconds()
|
||||
{
|
||||
LARGE_INTEGER counter;
|
||||
|
||||
@@ -100,6 +100,7 @@ public:
|
||||
static void SetThreadPriority(ThreadPriority priority);
|
||||
static void SetThreadAffinityMask(uint64 affinityMask);
|
||||
static void Sleep(int32 milliseconds);
|
||||
static void Yield();
|
||||
static double GetTimeSeconds();
|
||||
static uint64 GetTimeCycles();
|
||||
static uint64 GetClockFrequency();
|
||||
|
||||
Reference in New Issue
Block a user