Google Guava Stopwatch(計時器)

FrankYou發表於2018-11-05

 

Stopwatch stopwatch =newStopwatch().start();
//do something test
for(int i =0; i <10000; i++){
   }
long nanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); System.out.println(nanos);

 

相關文章