Class TickingThread
java.lang.Object
com.hypixel.hytale.server.core.util.thread.TickingThread
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
World,WorldMapManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HistoricMetricprivate final booleanstatic final intstatic final intprivate final AtomicBooleanstatic longprivate CompletableFuture<Void> private Threadprivate final Stringprivate intprivate intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionTickingThread(String threadName) TickingThread(String threadName, int tps, boolean daemon) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected ThreadintintgetTps()booleanprotected booleanisIdle()booleanbooleanprotected abstract voidprotected voidonStart()voidrun()protected voidDeprecated.voidsetTps(int tps) start()voidstop()protected abstract voidtick(float var1)
-
Field Details
-
NANOS_IN_ONE_MILLI
public static final int NANOS_IN_ONE_MILLI- See Also:
-
NANOS_IN_ONE_SECOND
public static final int NANOS_IN_ONE_SECOND- See Also:
-
TPS
public static final int TPS- See Also:
-
SLEEP_OFFSET
public static long SLEEP_OFFSET -
threadName
-
daemon
private final boolean daemon -
needsShutdown
-
tps
private int tps -
tickStepNanos
private int tickStepNanos -
bufferedTickLengthMetricSet
-
thread
-
startedFuture
-
-
Constructor Details
-
TickingThread
-
TickingThread
-
-
Method Details
-
run
public void run() -
isIdle
protected boolean isIdle() -
tick
protected abstract void tick(float var1) -
onStart
protected void onStart() -
onShutdown
protected abstract void onShutdown() -
start
-
interrupt
public boolean interrupt() -
stop
public void stop() -
setTps
public void setTps(int tps) -
getTps
public int getTps() -
getTickStepNanos
public int getTickStepNanos() -
getBufferedTickLengthMetricSet
-
clearMetrics
public void clearMetrics() -
debugAssertInTickingThread
public void debugAssertInTickingThread() -
isInThread
public boolean isInThread() -
isStarted
public boolean isStarted() -
setThread
Deprecated. -
getThread
-