功能
可用于耗时计算
基本使用
Stopwatch watch = Stopwatch.createStarted();
//do something
watch.stop();
int timecost = (int) watch.elapsed(TimeUnit.MILLISECONDS);
可用于耗时计算
Stopwatch watch = Stopwatch.createStarted();
//do something
watch.stop();
int timecost = (int) watch.elapsed(TimeUnit.MILLISECONDS);
本文标题:Stopwatch使用
本文链接:https://www.haomeiwen.com/subject/sqptcftx.html
网友评论