Beispiel #1
0
 @Override
 public void close() {
   addValue(Duration.nanosSince(start));
 }
Beispiel #2
0
 public <T> T time(Callable<T> callable) throws Exception {
   long start = System.nanoTime();
   T result = callable.call();
   addValue(Duration.nanosSince(start));
   return result;
 }