Interface Stopwatch


  • public interface Stopwatch
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      StopwatchResult getResult()
      Method returns the result of the measurement.
      boolean isRunning()
      Method checks if the stop watch is still running.
      Stopwatch start()
      Method starts the stop watch.
      Stopwatch start​(long pCount)
      Method starts the stop watch.
      void stop()
      Method stops a running measurement.
      void stop​(long pCount)
      Method stops a running measurement.
      void stopAndTrace()
      Method stops a running measurements and logs the result.
      void stopAndTrace​(long pCount)
      Method stops a running measurements and logs the result.
      void traceResult()
      Method logs the results of a measurement.
    • Method Detail

      • start

        Stopwatch start()
        Method starts the stop watch. A stop watch can be started multiple times. When starting the stop watch may be existing results will be deleted.
      • start

        Stopwatch start​(long pCount)
        Method starts the stop watch. A stop watch can be started multiple times. When starting the stop watch may be existing results will be deleted.
        Parameters:
        pName - Name of the executed measurement. The parameter may be null.
        pCount - Number of iterations.
      • stopAndTrace

        void stopAndTrace()
        Method stops a running measurements and logs the result.
      • stop

        void stop()
        Method stops a running measurement.
      • stop

        void stop​(long pCount)
        Method stops a running measurement.
        Parameters:
        pCount - Number of iterations.
      • stopAndTrace

        void stopAndTrace​(long pCount)
        Method stops a running measurements and logs the result.
        Parameters:
        pCount - Number of iterations.
      • isRunning

        boolean isRunning()
        Method checks if the stop watch is still running.
        Returns:
        boolean Method returns true if the stop watch is still running and otherwise false.
      • getResult

        StopwatchResult getResult()
        Method returns the result of the measurement. If the stop watch is not stopped then it will be done by this method.
        Returns:
        StopwatchResult Result of the measurement.
      • traceResult

        void traceResult()
        Method logs the results of a measurement.