Class Stopwatch

java.lang.Object
org.kquiet.utility.Stopwatch

public class Stopwatch extends Object
Stopwatch.
Author:
Kimberly
  • Constructor Details

    • Stopwatch

      public Stopwatch()
  • Method Details

    • start

      public void start()
      Start this Stopwatch without reset.
    • start

      public void start(boolean resetFlag)
      Start this Stopwatch with the option to reset.
      Parameters:
      resetFlag - true: reset; false: not reset
    • stop

      public void stop()
      Stop this Stopwatch.
    • getElapsedMilliSecond

      public long getElapsedMilliSecond()
      Get elapsed time in milliseconds.
      Returns:
      elapsed time in milliseconds
    • getElapsedNanoSecond

      public long getElapsedNanoSecond()
      Get elapsed time in nanoseconds.
      Returns:
      elapsed time in nanoseconds
    • getDuration

      public Duration getDuration()
      Get elapsed time.
      Returns:
      elapsed time represented by Duration