Class SingleTimer

java.lang.Object
com.atlassian.plugin.instrumentation.Timer
com.atlassian.plugin.instrumentation.SingleTimer
All Implemented Interfaces:
Closeable, AutoCloseable

public class SingleTimer extends Timer
Wrapper around an OpTimer that may be safely used even if that class is not present in the class loader.

This wrapper implements Closeable. On close it logs elapsed time and elapsed cpu time

Note to maintainers: extreme care must be taken to ensure that OpTimer not accessed at runtime if it is not present.

Since:
4.1
See Also:
  • Method Details

    • getName

      public String getName()
    • close

      public void close()
      End the timer, if instrumentation is present and enabled log clock time and cpu time
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class Timer