程序包 org.spigotmc

类 CustomTimingsHandler

java.lang.Object
org.spigotmc.CustomTimingsHandler

public class CustomTimingsHandler extends Object
为命令"/timings merged"提供自定义的计时项目.

原文:Provides custom timing sections for /timings merged.

  • 构造器详细资料

  • 方法详细资料

    • printTimings

      public static void printTimings(@NotNull @NotNull PrintStream printStream)
      打印timings计时项目名及其附加数据至指定的输出流.

      原文:Prints the timings and extra data to the given stream.

      参数:
      printStream - 输出流
    • reload

      public static void reload()
      重置所有的timings计时项目.

      原文:Resets all timings.

    • tick

      public static void tick()
      CraftBukkit将在服务器的每一个tick调用此方法, 以统计定时器(timer)导致的TPS丢失的次数.

      原文: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()
      重置计时器, 设置所有的值为0.

      原文:Reset this timer, setting all values to zero.