org.ujac.util
Class StopWatch

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

public class StopWatch
extends Object

Name: StopWatch
Description: A class for time measurements.

Author:
lauerc

Constructor Summary
StopWatch()
          Constructs a StopWatch instance with no specific attributes.
 
Method Summary
 long getDuration()
          Gets the time duration.
 long getStartTime()
          Gets the start time.
 long getStopTime()
          Gets the stop time.
 long meantime()
          Gets the current mean time that has been passed since the latest start time.
 long reset()
          Resets the stop watch.
 long stop()
          Stops the time measuring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopWatch

public StopWatch()
Constructs a StopWatch instance with no specific attributes.

Method Detail

stop

public long stop()
Stops the time measuring.

Returns:
The passed milli seconds since the stop watch has been started.

meantime

public long meantime()
Gets the current mean time that has been passed since the latest start time.

Returns:
The passed milli seconds since the stop watch has been started.

reset

public long reset()
Resets the stop watch.

Returns:
The new start time.

getStartTime

public long getStartTime()
Gets the start time.

Returns:
The time when the stop watch has been started.

getStopTime

public long getStopTime()
Gets the stop time.

Returns:
The time when the stop watch has been stop.

getDuration

public long getDuration()
Gets the time duration.

Returns:
The passed time between starting and stopping the stop watch.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.