public class TPSCalculator
extends java.lang.Object
Math: - Minecraft runs 20 ticks / second, 1 tick = 50ms - To return 20 ticks, 1 second is expected - If the call time is less than 1 second, the TPS is still 20, excess is not counted. - If the call time is more than 1 second, the TPS is below 20 - If 2 seconds, TPS is 10 - If 4 seconds, TPS is 5 - If 20 seconds, TPS is 1 - If more than 20 seconds, TPS is 0 for 20 seconds and then according to the other rules.
Modifier and Type | Field and Description |
---|---|
static long |
SECOND_NS |
Constructor and Description |
---|
TPSCalculator() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.Double> |
pulse(long time)
Pulse the TPS clock.
|