Class TimingLogHandler

java.lang.Object
ch.njol.skript.log.LogHandler
ch.njol.skript.log.TimingLogHandler
All Implemented Interfaces:
OpenCloseable, Closeable, AutoCloseable

public class TimingLogHandler extends LogHandler
A log handler that records the time since its creation.
  • Constructor Details

    • TimingLogHandler

      public TimingLogHandler()
  • Method Details

    • log

      public LogHandler.LogResult log(LogEntry entry)
      Specified by:
      log in class LogHandler
      Parameters:
      entry - entry to log
      Returns:
      Whether to print the specified entry or not.
    • start

      public TimingLogHandler start()
      Description copied from class: LogHandler
      A convenience method for SkriptLogger.startLogHandler(LogHandler).
      Implementations should override this to set the return type to the implementing class.
      Overrides:
      start in class LogHandler
    • 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.