public T measure(TimeMeasurable<T> measurable) {
    long startTime = start();
    LOG.trace("{} - start to measure at: {} ns.", label, startTime);
    // Here may throw exceptions which should be taken care by caller, not here.
    // If exception occurs, this time wouldn't count.
    T result = measurable.measure();
    long elapsed = stop(startTime);
    LOG.trace("{} - elapse: {} ns.", label, elapsed);
    updateMostRecentTime(elapsed);
    return result;
  }
Measure elapsed time of a measurable method.
@param measurable method implements {@link TimeMeasurable}
@return T it refers to the original return type of the measurable method
hbase-common/src/main/java/org/apache/hadoop/hbase/util/MovingAverage.java