Class StepTimer

All Implemented Interfaces:
HistogramSupport, Meter, Timer

public class StepTimer extends AbstractTimer
  • Constructor Details

    • StepTimer

      public StepTimer(Meter.Id id, Clock clock, DistributionStatisticConfig distributionStatisticConfig, PauseDetector pauseDetector, TimeUnit baseTimeUnit, long stepDurationMillis, boolean supportsAggregablePercentiles)
      Create a new StepTimer.
      Parameters:
      id - ID
      clock - clock
      distributionStatisticConfig - distribution statistic configuration
      pauseDetector - pause detector
      baseTimeUnit - base time unit
      stepDurationMillis - step in milliseconds
      supportsAggregablePercentiles - whether it supports aggregable percentiles
  • Method Details

    • recordNonNegative

      protected void recordNonNegative(long amount, TimeUnit unit)
      Specified by:
      recordNonNegative in class AbstractTimer
    • count

      public long count()
      Specified by:
      count in interface Timer
      Returns:
      The number of times that stop has been called on this timer.
    • totalTime

      public double totalTime(TimeUnit unit)
      Specified by:
      totalTime in interface Timer
      Parameters:
      unit - The base unit of time to scale the total to.
      Returns:
      The total time of recorded events.
    • max

      public double max(TimeUnit unit)
      Specified by:
      max in interface Timer
      Parameters:
      unit - The base unit of time to scale the max to.
      Returns:
      The maximum time of a single event.
    • _closingRollover

      public void _closingRollover()