Package org.jboss.util
Class StopWatch.Wrapper
- java.lang.Object
-
- org.jboss.util.StopWatch
-
- org.jboss.util.StopWatch.Wrapper
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAverageLapTime()
Get the average lap time since the watch was started.int
getLapCount()
Get the lap count.long
getLapTime()
Get the elapsed lap time since the watch was started.long
getTime()
Get the elapsed time since the watch was created or last reset.boolean
isRunning()
Check if the watch is running.void
reset()
Reset the watch.void
start()
Start the watch.void
start(boolean reset)
Start the watch.long
stop()
Stop the watch.java.lang.String
toString()
Return a string representation.-
Methods inherited from class org.jboss.util.StopWatch
clone, makeSynchronized
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serialVersionUID- See Also:
- Constant Field Values
-
watch
protected StopWatch watch
-
-
Constructor Detail
-
Wrapper
public Wrapper(StopWatch watch)
-
-
Method Detail
-
start
public void start(boolean reset)
Description copied from class:StopWatch
Start the watch.
-
start
public void start()
Description copied from class:StopWatch
Start the watch.
-
stop
public long stop()
Description copied from class:StopWatch
Stop the watch.
-
reset
public void reset()
Description copied from class:StopWatch
Reset the watch.
-
getLapTime
public long getLapTime()
Description copied from class:StopWatch
Get the elapsed lap time since the watch was started.- Overrides:
getLapTime
in classStopWatch
- Returns:
- Elapsed lap time or 0 if the watch was never started
-
getAverageLapTime
public long getAverageLapTime()
Description copied from class:StopWatch
Get the average lap time since the watch was started.- Overrides:
getAverageLapTime
in classStopWatch
- Returns:
- Average lap time since the watch was started.
-
getLapCount
public int getLapCount()
Description copied from class:StopWatch
Get the lap count.- Overrides:
getLapCount
in classStopWatch
- Returns:
- The lap count.
-
getTime
public long getTime()
Description copied from class:StopWatch
Get the elapsed time since the watch was created or last reset.
-
isRunning
public boolean isRunning()
Description copied from class:StopWatch
Check if the watch is running.
-
-