Package org.spigotmc

Class CustomTimingsHandler


  • public class CustomTimingsHandler
    extends Object
    Provides custom timing sections for /timings merged.
    • Constructor Detail

      • CustomTimingsHandler

        public CustomTimingsHandler​(@NotNull
                                    String name)
    • Method Detail

      • printTimings

        public static void printTimings​(@NotNull
                                        PrintStream printStream)
        Prints the timings and extra data to the given stream.
        Parameters:
        printStream - output stream
      • reload

        public static void reload()
        Resets all timings.
      • tick

        public static void tick()
        Ticked every tick by CraftBukkit to count the number of times a timer caused TPS loss.
      • startTiming

        public void startTiming()
        Starts timing to track a section of code.
      • stopTiming

        public void stopTiming()
        Stops timing a section of code.
      • reset

        public void reset()
        Reset this timer, setting all values to zero.