public class StopWatch
extends java.lang.Object
| Constructor and Description |
|---|
StopWatch()
Creates stopwatch without a name.
|
StopWatch(java.lang.String processName)
Creates stopwatch with a processName
processName |
| Modifier and Type | Method and Description |
|---|---|
StopWatch |
add()
Stops the measuring and adds the duration of the last iteration to a sum of all durations.
|
StopWatch |
end()
Stops the measuring
|
long |
getDuration() |
long |
getSumOfDurations() |
java.lang.String |
report() |
java.lang.String |
reportDuration() |
StopWatch |
reset()
Reseting sum of all durations
|
StopWatch |
start()
Starts the measuring
|
public StopWatch(java.lang.String processName)
processNameprocessName - The name of a process (so that we can differ it from other processes)public StopWatch()
public StopWatch add()
StopWatch objectpublic StopWatch reset()
StopWatch objectpublic long getDuration()
public long getSumOfDurations()
public java.lang.String report()
public java.lang.String reportDuration()