|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StopWatch
| Method Summary | |
|---|---|
void |
cancel()
Cancel monitoring. |
long |
getElapsedTime()
|
Monitor |
getMonitor()
|
boolean |
isPaused()
|
boolean |
isStoped()
|
void |
pause()
Temporary stop the StopWatch. |
void |
resume()
Resume the StopWatch after a pause. |
void |
stop()
Stop monitoring the process. |
void |
stop(boolean canceled)
Convenience method to stop or cancel a Stopwatch depending on success of monitored operation |
| Method Detail |
|---|
long getElapsedTime()
void pause()
void resume()
void stop()
#start(Monitor) cannot be re-used after stopped has been called.
void stop(boolean canceled)
canceled - void cancel()
In some circumstances you want to monitor time elapsed from early stage of computation, and discover latter if the computed data is relevant. For example, monitoring a messaging system, but beeing interested only by some types of messages. In such case, a StopWatch can be started early and canceled when the application is able to determine it's relevancy.
In any way, the probe will still report thread concurrency even if canceled.
boolean isStoped()
true if the StopWatch has been stoppedboolean isPaused()
true if the StopWatch has been pausedMonitor getMonitor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||