Add Platform::Yield

This commit is contained in:
Wojtek Figat
2025-07-28 18:33:05 +02:00
parent a7ffd9e57f
commit a00ffe6ec3
12 changed files with 34 additions and 4 deletions

View File

@@ -748,6 +748,11 @@ void AndroidPlatform::Sleep(int32 milliseconds)
usleep(milliseconds * 1000);
}
void AndroidPlatform::Yield()
{
pthread_yield();
}
double AndroidPlatform::GetTimeSeconds()
{
struct timespec ts;

View File

@@ -91,6 +91,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();
FORCE_INLINE static uint64 GetClockFrequency()