|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.driver.StopWatch
A stop-watch.
This stop-watch is not moving when created, and starts when its start
button is pushed. Its hand keeps moving until the stop button is pushd.
You can read the time ever accumulated by this stop-watch, by mili-second
order, whether it is moving or not. After the stop-watch is started and
stopped, it can be restarted by pushing its start button again.
| Field Summary | |
(package private) long |
cumulativeMiliSeconds
|
(package private) boolean |
moving
|
(package private) java.util.Date |
startedTime
|
(package private) java.util.Date |
stoppedTime
|
| Constructor Summary | |
StopWatch()
Creates a new stop-watch, whose hand is heading zero mili-second and not moving. |
|
| Method Summary | |
boolean |
isMoving()
Tests if this stop-watch is moving or not. |
long |
read()
Reads this stop-watch, whether it is moving or not. |
long |
reset()
Resets this stop-watch. |
java.util.Date |
start()
Starts moving this stop-watch. |
java.util.Date |
stop()
Stops moving this stop-watch. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.Date startedTime
java.util.Date stoppedTime
long cumulativeMiliSeconds
boolean moving
| Constructor Detail |
public StopWatch()
| Method Detail |
public java.util.Date start()
public java.util.Date stop()
public long read()
public boolean isMoving()
public long reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||