Class SimpleTimerImpl.Context

    • Method Detail

      • stop

        public long stop()
        Updates the timer with the difference between current and start time. Call to this method will not reset the start time. Multiple calls result in multiple updates.
        Specified by:
        stop in interface org.eclipse.microprofile.metrics.SimpleTimer.Context
        Returns:
        the elapsed time in nanoseconds
      • close

        public void close()
        Equivalent to calling stop().
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface org.eclipse.microprofile.metrics.SimpleTimer.Context