StopWatch stopWatch = StopWatch.createStarted();
//do searchFuc() or Something
stopWatch.stop();
println(String.format("共耗时:%s",stopWatch.getTime(TimeUnit.MILLISECONDS)));
注意有始有终!
StopWatch stopWatch = StopWatch.createStarted();
//do searchFuc() or Something
stopWatch.stop();
println(String.format("共耗时:%s",stopWatch.getTime(TimeUnit.MILLISECONDS)));
注意有始有终!