public interface Timing extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
abort()
Stops timing and disregards current timing data.
|
void |
close() |
default double |
getAverage()
Get Average tick time of the timing
|
default int |
getCurrentCount()
Get Current Tick total time of the timing
|
default int |
getCurrentTotal()
Get Current Tick total time of the timing
|
default String |
getName()
Get the name of the handler
|
co.aikar.timings.TimingHandler |
getTimingHandler()
Used internally to get the actual backing Handler in the case of delegated Handlers
|
void |
startTiming()
Starts timing the execution until
stopTiming() is called. |
void |
startTimingIfSync()
Starts timing the execution until
stopTiming() is called. |
void |
stopTiming()
Stops timing and records the data.
|
void |
stopTimingIfSync()
Stops timing and records the data.
|
void startTiming()
stopTiming()
is called.void stopTiming()
Stops timing and records the data. Propagates the data up to group handlers.
Will automatically be called when this Timing is used with try-with-resourcesvoid startTimingIfSync()
stopTiming()
is called.
But only if we are on the primary thread.void stopTimingIfSync()
Stops timing and records the data. Propagates the data up to group handlers.
Will automatically be called when this Timing is used with try-with-resources
But only if we are on the primary thread.void abort()
co.aikar.timings.TimingHandler getTimingHandler()
void close()
close
in interface AutoCloseable
default double getAverage()
default int getCurrentTotal()
default int getCurrentCount()
default String getName()
Copyright © 2022. All rights reserved.