[*] Switch to astatic Aurora::Utility::RateLimiter limiter` for gRuntimeConfig.threadingConfig.bWinXpThrough7BlazeOptimizerPower

This commit is contained in:
Reece Wilson 2023-09-10 14:53:54 +01:00
parent 74dc6772b0
commit c6c35a588c

View File

@ -238,7 +238,6 @@ namespace Aurora
void Win32DropSchedulerResolution()
{
static AuUInt uCounter {};
ULONG ullActualResolution {};
if (gShouldResPathDoNothing)
@ -248,20 +247,15 @@ namespace Aurora
if (gRuntimeConfig.threadingConfig.bEnableAgrSchedulingRatelimit)
{
AuUInt uCount {};
if (!(((uCount = uCounter++)) & (1ull << (gRuntimeConfig.threadingConfig.bWinXpThrough7BlazeOptimizerPower + 5ull))))
static Aurora::Utility::RateLimiter limiter;
if (!limiter.nsTimeStep)
{
if (uCount != 0)
{
return;
}
limiter.SetNextStep(gRuntimeConfig.threadingConfig.bWinXpThrough7BlazeOptimizerPower);
}
else
else if (!limiter.CheckExchangePass())
{
uCounter = 0;
return;
}
}
if (pZwSetTimerResolution)