Configurable TPS Catchup

This commit is contained in:
William Blake Galbreath
2025-01-05 15:42:33 -08:00
committed by granny
parent 417ddf761e
commit 676b9dbb76
3 changed files with 18 additions and 37 deletions

View File

@@ -16,6 +16,19 @@
tickSection = currentTime;
}
// Paper end - further improve server tick loop
@@ -1260,6 +_,12 @@
profilerFiller.popPush("nextTickWait");
this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + l, this.nextTickTimeNanos);
+ // Purpur start - Configurable TPS Catchup
+ if (!org.purpurmc.purpur.PurpurConfig.tpsCatchup /*|| !gg.pufferfish.pufferfish.PufferfishConfig.tpsCatchup*/) { // Purpur - Configurable TPS Catchup
+ this.nextTickTimeNanos = currentTime + l;
+ this.delayedTasksMaxNextTickTimeNanos = nextTickTimeNanos;
+ }
+ // Purpur end - Configurable TPS Catchup
this.startMeasuringTaskExecutionTime();
this.waitUntilNextTick();
this.finishMeasuringTaskExecutionTime();
@@ -1854,7 +_,7 @@
@DontObfuscate