Interface Timer.Sample

Enclosing interface:
Timer

public static interface Timer.Sample
Measures an interval of time from instantiation to an explicit invocation of stop(io.helidon.metrics.api.Timer).

A Sample is not bound to a specific Timer until it is stopped, at which time the caller specifies which timer to update.

  • Method Summary

    Modifier and Type
    Method
    Description
    long
    stop(Timer timer)
    Ends the interval, recording the current time as the end time of the interval and applying the elapsed time to the specified Timer.
  • Method Details

    • stop

      long stop(Timer timer)
      Ends the interval, recording the current time as the end time of the interval and applying the elapsed time to the specified Timer.
      Parameters:
      timer - the timer to update with this interval
      Returns:
      duration of the sample (in nanoseconds)