Package org.kquiet.utility
Class Stopwatch
java.lang.Object
org.kquiet.utility.Stopwatch
Stopwatch.
- Author:
- Kimberly
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Stopwatch
public Stopwatch()
-
-
Method Details
-
start
public void start()Start thisStopwatch
without reset. -
start
public void start(boolean resetFlag) Start thisStopwatch
with the option to reset.- Parameters:
resetFlag
-true
: reset;false
: not reset
-
stop
public void stop()Stop thisStopwatch
. -
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
Get elapsed time.- Returns:
- elapsed time represented by
Duration
-