[*] Switch to astatic Aurora::Utility::RateLimiter limiter` for gRuntimeConfig.threadingConfig.bWinXpThrough7BlazeOptimizerPower
This commit is contained in:
parent
74dc6772b0
commit
c6c35a588c
@ -238,7 +238,6 @@ namespace Aurora
|
|||||||
|
|
||||||
void Win32DropSchedulerResolution()
|
void Win32DropSchedulerResolution()
|
||||||
{
|
{
|
||||||
static AuUInt uCounter {};
|
|
||||||
ULONG ullActualResolution {};
|
ULONG ullActualResolution {};
|
||||||
|
|
||||||
if (gShouldResPathDoNothing)
|
if (gShouldResPathDoNothing)
|
||||||
@ -248,20 +247,15 @@ namespace Aurora
|
|||||||
|
|
||||||
if (gRuntimeConfig.threadingConfig.bEnableAgrSchedulingRatelimit)
|
if (gRuntimeConfig.threadingConfig.bEnableAgrSchedulingRatelimit)
|
||||||
{
|
{
|
||||||
AuUInt uCount {};
|
static Aurora::Utility::RateLimiter limiter;
|
||||||
if (!(((uCount = uCounter++)) & (1ull << (gRuntimeConfig.threadingConfig.bWinXpThrough7BlazeOptimizerPower + 5ull))))
|
if (!limiter.nsTimeStep)
|
||||||
{
|
{
|
||||||
if (uCount != 0)
|
limiter.SetNextStep(gRuntimeConfig.threadingConfig.bWinXpThrough7BlazeOptimizerPower);
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else if (!limiter.CheckExchangePass())
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
uCounter = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pZwSetTimerResolution)
|
if (pZwSetTimerResolution)
|
||||||
|
Loading…
Reference in New Issue
Block a user