code: public synchronized DoubleHistogram getIntervalHistogram(DoubleHistogram histogramToRecycle) {
          // Verify that replacement histogram can validly be used as an inactive histogram replacement:
          validateFitAsReplacementHistogram(histogramToRecycle);
          inactiveHistogram = (InternalConcurrentDoubleHistogram) histogramToRecycle;
          performIntervalSample();
          DoubleHistogram sampledHistogram = inactiveHistogram;
          inactiveHistogram = null; // Once we expose the sample, we can't reuse it internally until it is recycled
          return sampledHistogram;
      }
docs: Get an interval histogram, which will include a stable, consistent view of all value counts
  accumulated since the last interval histogram was taken.
  <p>
  {@link DoubleRecorder#getIntervalHistogram(DoubleHistogram histogramToRecycle)
  getIntervalHistogram(histogramToRecycle)}
  accepts a previously returned interval histogram that can be recycled internally to avoid allocation
  and content copying operations, and is therefore significantly more efficient for repeated use than
  {@link DoubleRecorder#getIntervalHistogram()} and
  {@link DoubleRecorder#getIntervalHistogramInto getIntervalHistogramInto()}. The provided
  {@code histogramToRecycle} must
  be either be null or an interval histogram returned by a previous call to
  {@link DoubleRecorder#getIntervalHistogram(DoubleHistogram histogramToRecycle)
  getIntervalHistogram(histogramToRecycle)} or
  {@link DoubleRecorder#getIntervalHistogram()}.
  <p>
  NOTE: The caller is responsible for not recycling the same returned interval histogram more than once. If
  the same interval histogram instance is recycled more than once, behavior is undefined.
  <p>
  Calling {@link DoubleRecorder#getIntervalHistogram(DoubleHistogram histogramToRecycle)
  getIntervalHistogram(histogramToRecycle)} will reset the value counts, and start accumulating value
  counts for the next interval
  
  @param histogramToRecycle a previously returned interval histogram that may be recycled to avoid allocation and
  copy operations.
  @return a histogram containing the value counts accumulated since the last interval histogram was taken.