Common: Add UWP support for helper classes

This commit is contained in:
Connor McLaughlin
2021-07-04 19:09:11 +10:00
parent 281f7c5789
commit 03ab18909a
13 changed files with 317 additions and 41 deletions

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));