public interface Cost
Modifier and Type | Method and Description |
---|---|
long |
stop()
停止计时,返回计时结果
|
String |
stopAccurate()
停止计时,返回精确计时,带3小数的结果,使用ROUND_DOWN 舍弃超过3位的小数部分。
|
String |
stopAccurateAndFormat()
停止计时,并返回组装精确计时结果
|
void |
stopAccurateAndPrint()
停止计时,并打印精确计时结果
|
String |
stopAndFormat()
停止计时,并返回组装计时结果
|
void |
stopAndPrint()
停止计时,并打印计时结果
|
long stop()
void stopAndPrint()
例如: name cost: 1000 ms, 使用System.out.println
String stopAndFormat()
例如: name cost: 1000 ms
String stopAccurate()
例如:1000.500
void stopAccurateAndPrint()
例如: name cost: 1000.500 ms, 使用System.out.println
String stopAccurateAndFormat()
例如: name cost: 1000.500 ms
Copyright © 2021. All rights reserved.