Package co.aikar.timings
Interface Timing
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
FullServerTickHandler
,NullTimingHandler
Provides an ability to time sections of code within the Minecraft Server
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Deprecated.Doesn't do anything - Removedvoid
close()
@Nullable co.aikar.timings.TimingHandler
Used internally to get the actual backing Handler in the case of delegated HandlersStarts timing the execution untilstopTiming()
is called.Starts timing the execution untilstopTiming()
is called.void
Stops timing and records the data.void
Stops timing and records the data.
-
Method Details
-
startTiming
Starts timing the execution untilstopTiming()
is called.- Returns:
- Timing
-
stopTiming
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-resources -
startTimingIfSync
Starts timing the execution untilstopTiming()
is called. But only if we are on the primary thread.- Returns:
- Timing
-
stopTimingIfSync
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. -
abort
Deprecated.Doesn't do anything - Removed -
getTimingHandler
Used internally to get the actual backing Handler in the case of delegated Handlers- Returns:
- TimingHandler
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
-