类 StopWatch

java.lang.Object
cool.scx.common.util.StopWatch

public final class StopWatch extends Object
简易计时器类 用来计算启动时间 注意 !!! 此工具类的计时并不准确, 仅建议用于时间不敏感的操作
版本:
0.0.1
作者:
scx567888
  • 构造器详细资料

    • StopWatch

      public StopWatch()
  • 方法详细资料

    • start

      public static void start(String name)
      启动计时器
      参数:
      name - a String object.
    • start

      public static String start()
      创建随机名称
      返回:
      a
    • reset

      public static void reset(String name)
      a
      参数:
      name - a
    • stopToNanos

      public static long stopToNanos(String name)
      停止计时并返回时间差 单位微毫秒
      参数:
      name - a String object.
      返回:
      时间差
    • stopToMillis

      public static long stopToMillis(String name)
      停止计时并返回时间差 单位毫秒
      参数:
      name - a String object.
      返回:
      时间差
    • stopToSeconds

      public static double stopToSeconds(String name)
      停止计时并返回时间差 单位秒
      参数:
      name - a String object.
      返回:
      时间差