public class Stopwatch
extends java.lang.Object
构造器和说明 |
---|
Stopwatch() |
限定符和类型 | 方法和说明 |
---|---|
static Stopwatch |
begin()
秒表开始计时,计时时间的最小单位是毫秒
|
static Stopwatch |
beginNano()
秒表开始计时,计时时间的最小单位是毫微秒
|
static Stopwatch |
create()
创建一个秒表对象,该对象的计时时间的最小单位是毫秒
|
static Stopwatch |
createNano()
创建一个秒表对象,该对象的计时时间的最小单位是毫微秒
|
long |
getDuration()
返回计时结果
|
long |
getEndTime()
停止计时的时间,该时间最小单位由创建秒表时确定
|
long |
getStartTime()
开始计时的时间,该时间最小单位由创建秒表时确定
|
static Stopwatch |
run(java.lang.Runnable atom) |
static Stopwatch |
runNano(java.lang.Runnable atom) |
long |
start()
开始计时,并返回开始计时的时间,该时间最小单位由创建秒表时确定
|
long |
stop()
停止计时,并返回停止计时的时间,该时间最小单位由创建秒表时确定
|
java.lang.String |
toString()
返回格式为
Total: [计时时间][计时时间单位] : [计时开始时间]=>[计时结束时间] 的字符串 |
public static Stopwatch begin()
public static Stopwatch beginNano()
public static Stopwatch create()
public static Stopwatch createNano()
public static Stopwatch run(java.lang.Runnable atom)
public static Stopwatch runNano(java.lang.Runnable atom)
public long start()
public long stop()
public long getDuration()
public long getStartTime()
public long getEndTime()
public java.lang.String toString()
Total: [计时时间][计时时间单位] : [计时开始时间]=>[计时结束时间]
的字符串toString
在类中 java.lang.Object
Total: [计时时间][计时时间单位] : [计时开始时间]=>[计时结束时间]
的字符串