sdsu.util
Class Timer

java.lang.Object
  |
  +--sdsu.util.Timer

public class Timer
extends java.lang.Object

Timer measures the wall time (total lapsed-time) between the call to start and stop methods. Note that wall time is not the same as cpu time consumed by a process, particularly in a system that supports the threads on a multi-user system. Java claims time is measuered in milliseconds.

Version:
1.0 11 January 1998
Author:
Roger Whitney (whitney@cs.sdsu.edu)

Constructor Summary
Timer()
           
 
Method Summary
 void pause()
          Pause the timer.
 void reset()
          Reset the timer to zero.
 void start()
          Start the timer.
 long stop()
          Stop the timer.
 long time()
          Return the time measured by the timer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timer

public Timer()
Method Detail

start

public void start()
Start the timer.

pause

public void pause()
Pause the timer.

stop

public long stop()
Stop the timer. Return the time measured by the timer.

reset

public void reset()
Reset the timer to zero.

time

public long time()
Return the time measured by the timer.