| 构造器和说明 |
|---|
MillisecondCost() |
MillisecondCost(String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
stop()
停止计时,返回计时结果
|
String |
stopAccurate()
停止计时,返回精确计时,带3小数的结果,使用ROUND_DOWN 舍弃超过3位的小数部分。
|
String |
stopAccurateAndFormat()
停止计时,并返回组装精确计时结果
例如: name cost: 1000.500 ms
|
void |
stopAccurateAndPrint()
停止计时,并打印精确计时结果
例如: name cost: 1000.500 ms, 使用System.out.println
|
String |
stopAndFormat()
停止计时,并返回组装计时结果
例如: name cost: 1000 ms
|
void |
stopAndPrint()
停止计时,并打印计时结果
例如: name cost: 1000 ms, 使用System.out.println
|
public MillisecondCost()
public MillisecondCost(String name)
public void stopAndPrint()
Cost例如: name cost: 1000 ms, 使用System.out.println
stopAndPrint 在接口中 Costpublic String stopAndFormat()
Cost例如: name cost: 1000 ms
stopAndFormat 在接口中 Costpublic String stopAccurate()
Cost例如:1000.500
stopAccurate 在接口中 Costpublic void stopAccurateAndPrint()
Cost例如: name cost: 1000.500 ms, 使用System.out.println
stopAccurateAndPrint 在接口中 Costpublic String stopAccurateAndFormat()
Cost例如: name cost: 1000.500 ms
stopAccurateAndFormat 在接口中 CostCopyright © 2021. All rights reserved.