Class LongTaskTimer.Sample

java.lang.Object
io.micrometer.core.instrument.LongTaskTimer.Sample
Enclosing interface:
LongTaskTimer

public static class LongTaskTimer.Sample
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Sample​(LongTaskTimer timer, long task)  
  • Method Summary

    Modifier and Type Method Description
    double duration​(java.util.concurrent.TimeUnit unit)  
    long stop()
    Records the duration of the operation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • stop

      public long stop()
      Records the duration of the operation
      Returns:
      The duration, in nanoseconds, of this sample that was stopped
    • duration

      public double duration​(java.util.concurrent.TimeUnit unit)
      Parameters:
      unit - time unit to which the return value will be scaled
      Returns:
      duration of this sample