org.aeonscope.lang.time
Class Chrono

java.lang.Object
  extended by org.aeonscope.lang.time.Chrono

public class Chrono
extends Object

Records a duration of time including multiple stops and starts.

Author:
Brooke Kuhlmann

Field Summary
static String DEFAULT_PATTERN
          The default time pattern.
 
Constructor Summary
Chrono()
          Constructs a new chrono.
 
Method Summary
 String getFormattedTime()
          The formatted time.
 long getTime()
          The total duration of time that the chrono has been running.
 void reset()
          Resets time duration to zero.
 void start()
          Starts recording time.
 void stop()
          Stops recording time.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PATTERN

public static final String DEFAULT_PATTERN
The default time pattern.

See Also:
Constant Field Values
Constructor Detail

Chrono

public Chrono()
Constructs a new chrono.

Method Detail

reset

public void reset()
Resets time duration to zero.


start

public void start()
Starts recording time.


stop

public void stop()
Stops recording time.


getTime

public long getTime()
The total duration of time that the chrono has been running.

Returns:
The time duration.

getFormattedTime

public String getFormattedTime()
The formatted time.

Returns:
The formatted time.