ch.aplu.util
Class BaseTimer

java.lang.Object
  |
  +--ch.aplu.util.BaseTimer
Direct Known Subclasses:
HiResTimer, LoResTimer

public abstract class BaseTimer
extends java.lang.Object

Abstract base class for HiResTimer and LoResTimer. See HiResTimer or LoResTimer for more details.


Method Summary
 long getTime()
          Return the current timer's value in microseconds (us).
 boolean isRunning()
          Return true if the timer is running.
 void reset()
          Stop the timer and set its value to zero.
 void resume()
          Restart the timer from its current value.
 void start()
          Reset the timer to zero and start it.
 void stop()
          Stop the timer and store the current value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTime

public long getTime()
Return the current timer's value in microseconds (us).


start

public void start()
Reset the timer to zero and start it. (If it was running or not.)


stop

public void stop()
Stop the timer and store the current value.


resume

public void resume()
Restart the timer from its current value.


reset

public void reset()
Stop the timer and set its value to zero.


isRunning

public boolean isRunning()
Return true if the timer is running.