|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A simple timing device you can use to time any event. Sample use.
Stopwatch stopwatch = new SystemClockStopwatch(); // Your event starts... stopwatch.start(); // Your event goes on... // Your event ends... stopwatch.stop(); long timeInMilliseconds = stopwatch.getLastTime(); stopwatch.reset(); // Next event starts... stopwatch.start(); // And so on...
Method Summary | |
long |
getLastTime()
Returns the last time interval recorded by the stopwatch. |
void |
reset()
Resets the stopwatch, clearing the last time and preparing the shopwatch to be started again. |
void |
start()
Start the stopwatch. |
void |
stop()
Stops the stopwatch. |
Method Detail |
public void start()
public void stop()
public void reset()
public long getLastTime()
stop()
after having invoked start()
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |