Class ObserverWithDelegateI

All Implemented Interfaces:
Observer

public class ObserverWithDelegateI extends ObserverWithDelegate<Metrics,Observer>
Observer implementation that supports delegation to another observer.
  • Constructor Details

    • ObserverWithDelegateI

      public ObserverWithDelegateI()
  • Method Details

    • start

      public void start()
      Starts the stopwatch.
    • stop

      public long stop()
      Stops the stopwatch and returns the elapsed time.
      Returns:
      the elapsed time in microseconds
    • isStarted

      public boolean isStarted()
      Checks whether the stopwatch is currently running.
      Returns:
      true if the stopwatch is started, false otherwise
    • delay

      public long delay()
      Gets the current elapsed time without stopping the stopwatch.
      Returns:
      the elapsed time in microseconds since start was called