Common: Add UWP support for helper classes

This commit is contained in:
Connor McLaughlin committed 2021-07-11 15:20:38 +10:00
1 parent 281f7c5789
commit 03ab18909a
13 files changed
+317 -41

No files matched your search

+2
View File
@@ -93,6 +93,7 @@ void Timer::SleepUntil(Value value, bool exact)
if (diff <= 0)
return;
#ifndef _UWP
HANDLE timer = GetSleepTimer();
if (timer)
{
@@ -110,6 +111,7 @@ void Timer::SleepUntil(Value value, bool exact)
return;
}
}
#endif
// falling back to sleep... bad.
Sleep(static_cast<DWORD>(static_cast<std::uint64_t>(diff) / 1000000));