Class StopWatch
java.lang.Object
cool.scx.common.util.StopWatch
简易计时器类 用来计算启动时间
注意 !!! 此工具类的计时并不准确, 仅建议用于时间不敏感的操作
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidastatic Stringstart()创建随机名称static void启动计时器static longstopToMillis(String name) 停止计时并返回时间差 单位毫秒static longstopToNanos(String name) 停止计时并返回时间差 单位微毫秒static doublestopToSeconds(String name) 停止计时并返回时间差 单位秒
-
Constructor Details
-
StopWatch
public StopWatch()
-
-
Method Details
-
start
-
start
-
reset
-
stopToNanos
-
stopToMillis
-
stopToSeconds
-