org.xerial.util
Class StopWatch

java.lang.Object
  extended by org.xerial.util.StopWatch

public class StopWatch
extends Object

StopWatch measures interval times.

Author:
leo

Constructor Summary
StopWatch()
           
 
Method Summary
 double getElapsedTime()
          Gets the elapsed time since this instance is created in seconds.
 double getIntervalTime()
          Gets the interval time since the last call of StopWatch#getEleapsedTime() or getIntervalTime()
 void reset()
          Reset the stop watch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopWatch

public StopWatch()
Method Detail

getElapsedTime

public double getElapsedTime()
Gets the elapsed time since this instance is created in seconds.

Returns:
the elapsed time in seconds.

getIntervalTime

public double getIntervalTime()
Gets the interval time since the last call of StopWatch#getEleapsedTime() or getIntervalTime()

Returns:
the interval time in seconds

reset

public void reset()
Reset the stop watch. The subsequent calls to StopWatch#getEleapsedTime() or getIntervalTime() will measure the time intervals beginning from this method call.



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.