public void addNewDuration(long duration){
  callsNumber.incrementAndGet();
  total.addAndGet(duration);
synchronized (lock) {
    if (duration < minimum.longValue()) {
      minimum.set(duration);
    }
    if (duration > maximum.longValue()) {
      maximum.set(duration);
    }
  }
}

public void addNewDuration ( long duration ) { callsNumber . incrementAndGet ( ) ; total . addAndGet ( duration ) ; synchronized ( lock ) { if ( duration < minimum . longValue ( ) ) { minimum . set ( duration ) ; } if ( duration > maximum . longValue ( ) ) { maximum . set ( duration ) ; } } }
add a new operation duration to this class . total is updated and calls is incremented
