com.timeindexing.time
Class StopWatch

java.lang.Object
  extended bycom.timeindexing.time.StopWatch

public class StopWatch
extends java.lang.Object

A simple stop watch that returns the time that has elapsed since the StopWatch started.


Constructor Summary
StopWatch()
          Create a StopWatch reporting in MillisecondScale.
StopWatch(Scale theScale)
          Create a StopWatch with a specific Scale
 
Method Summary
 RelativeTimestamp getLastReading()
          Get the last reading.
 RelativeTimestamp read()
          Read a new elapsed time from the StopWatch.
protected  void setElapsedTime()
           
protected  void setStartTime()
           
 StopWatch start()
          Start the StopWatch.
 StopWatch stop()
          Stop the StopWatch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopWatch

public StopWatch()
Create a StopWatch reporting in MillisecondScale.


StopWatch

public StopWatch(Scale theScale)
Create a StopWatch with a specific Scale

Method Detail

start

public StopWatch start()
Start the StopWatch.


stop

public StopWatch stop()
Stop the StopWatch.


read

public RelativeTimestamp read()
Read a new elapsed time from the StopWatch.


getLastReading

public RelativeTimestamp getLastReading()
Get the last reading. This does not get a new time.


setStartTime

protected void setStartTime()

setElapsedTime

protected void setElapsedTime()