Interface Stopwatch
-
public interface Stopwatch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StopwatchResultgetResult()Method returns the result of the measurement.booleanisRunning()Method checks if the stop watch is still running.Stopwatchstart()Method starts the stop watch.Stopwatchstart(long pCount)Method starts the stop watch.voidstop()Method stops a running measurement.voidstop(long pCount)Method stops a running measurement.voidstopAndTrace()Method stops a running measurements and logs the result.voidstopAndTrace(long pCount)Method stops a running measurements and logs the result.voidtraceResult()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:
StopwatchResultResult of the measurement.
-
traceResult
void traceResult()
Method logs the results of a measurement.
-
-