All Packages Class Hierarchy This Package Previous Next Index
Class Timer.Timer
java.lang.Object
|
+----Timer.Timer
- public class Timer
- extends Object
RUNNING() == true <==> start() called with no corresponding
call to stop()
All times are given in units of msec.
-
Timer()
- post : initializes Timer to 0 msec
-
elapsed()
- post : RUNNING() ==> returns the time since last
call to start()
!RUNNING() ==> returns total elapsed time
-
reset()
- post : stops timing, if currently RUNNING(); resets
accumulated time to 0.
-
start()
- post : starts the timer.
-
stop()
- post : stops the timer.
Timer
public Timer()
- post : initializes Timer to 0 msec
start
public void start()
- post : starts the timer. accumulates time
across multiple calls to start.
stop
public long stop()
- post : stops the timer. returns the time elapsed
since the last matching call to start(), or
0 if no such matching call was made.
elapsed
public long elapsed()
- post : RUNNING() ==> returns the time since last
call to start()
!RUNNING() ==> returns total elapsed time
reset
public void reset()
- post : stops timing, if currently RUNNING(); resets
accumulated time to 0.
All Packages Class Hierarchy This Package Previous Next Index