[*] i want every bit of performance i can squeeze out of old windows operating systems
This commit is contained in:
parent
08f790c3af
commit
a2cfb7765b
@ -49,6 +49,8 @@ namespace Aurora::IO::TLS
|
||||
|
||||
static thread_local bool tlsHackIsMainThread {};
|
||||
|
||||
static void Pump();
|
||||
|
||||
static void Init()
|
||||
{
|
||||
Aurora::InitProcAddresses();
|
||||
@ -87,6 +89,8 @@ static void Init()
|
||||
Aurora::Hashing::InitHashing();
|
||||
Aurora::Async::InitAsync();
|
||||
gRuntimeRunLevel = 2;
|
||||
|
||||
Pump();
|
||||
}
|
||||
|
||||
static void Pump()
|
||||
@ -98,7 +102,13 @@ static void Pump()
|
||||
#endif
|
||||
|
||||
#if defined(AURORA_PLATFORM_WIN32)
|
||||
::timeBeginPeriod(1);
|
||||
if (!AuSwInfo::IsWindows8Point1OrGreater())
|
||||
{
|
||||
if (::timeBeginPeriod(0) == TIMERR_NOCANDO)
|
||||
{
|
||||
::timeBeginPeriod(1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "AuWakeOnAddress.hpp"
|
||||
#include "Primitives/SMTYield.hpp"
|
||||
#if defined(AURORA_PLATFORM_WIN32)
|
||||
#include <timeapi.h>
|
||||
#endif
|
||||
|
||||
namespace Aurora::Threading
|
||||
{
|
||||
@ -133,6 +136,13 @@ namespace Aurora::Threading
|
||||
|
||||
#else
|
||||
|
||||
#if defined(AURORA_PLATFORM_WIN32)
|
||||
if (::timeBeginPeriod(0) == TIMERR_NOCANDO)
|
||||
{
|
||||
::timeBeginPeriod(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
this->variable.WaitForSignalNS(uTimeRemNS);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user