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

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

This wrapper implements Closeable

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

    • getOpTimer

      public Optional<com.atlassian.instrumentation.operations.OpTimer> getOpTimer()
      Retrieve the timer, if instrumentation is present and enabled.
    • close

      public void close()
      End the timer, if instrumentation is present and enabled.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable