mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-20 22:31:34 +01:00
chore: field reordering
(cherry picked from commit 2b0737615f8171a0172ba902786da0542f962d78)
This commit is contained in:
parent
4e33a5e6d8
commit
a032bc32a7
@ -10,6 +10,9 @@ import java.util.concurrent.locks.LockSupport;
|
||||
public final class TickSchedulerThread extends MinestomThread {
|
||||
private final ServerProcess serverProcess;
|
||||
|
||||
private final long startTickNs = System.nanoTime();
|
||||
private long tick = 1;
|
||||
|
||||
public TickSchedulerThread(ServerProcess serverProcess) {
|
||||
super(MinecraftServer.THREAD_NAME_TICK_SCHEDULER);
|
||||
this.serverProcess = serverProcess;
|
||||
@ -29,10 +32,6 @@ public final class TickSchedulerThread extends MinestomThread {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private final long startTickNs = System.nanoTime();
|
||||
private long tick = 1;
|
||||
|
||||
private void fixTickRate(long tickNs) {
|
||||
long nextTickNs = startTickNs + (tickNs * tick);
|
||||
if (System.nanoTime() < nextTickNs) {
|
||||
|
Loading…
Reference in New Issue
Block a user