Package ch.njol.skript.log
Class TimingLogHandler
java.lang.Object
ch.njol.skript.log.LogHandler
ch.njol.skript.log.TimingLogHandler
- All Implemented Interfaces:
OpenCloseable,Closeable,AutoCloseable
A log handler that records the time since its creation.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.njol.skript.log.LogHandler
LogHandler.LogResult -
Field Summary
Fields inherited from interface ch.njol.util.OpenCloseable
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetStart()longstart()A convenience method forSkriptLogger.startLogHandler(LogHandler).
-
Constructor Details
-
TimingLogHandler
public TimingLogHandler()
-
-
Method Details
-
log
- Specified by:
login classLogHandler- Parameters:
entry- entry to log- Returns:
- Whether to print the specified entry or not.
-
start
Description copied from class:LogHandlerA convenience method forSkriptLogger.startLogHandler(LogHandler).
Implementations should override this to set the return type to the implementing class.- Overrides:
startin classLogHandler
-
getStart
public long getStart()- Returns:
- the time in milliseconds of when this log handler was created.
-
getTimeTaken
public long getTimeTaken()- Returns:
- the time in milliseconds between now and this log handler's creation.
-