public void increment(final long startTime) {
            count.incrementAndGet();
            cumulativeDuration.addAndGet(System.currentTimeMillis() - startTime);
        }
A counter that can measure duration and number of events.
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/FutureRequestExecutionMetrics.java