eaLib API Docs
Last Modified : January 7 2002

mss.ea.stat
Class Timer

java.lang.Object
  |
  +--mss.ea.stat.Timer

public class Timer
extends java.lang.Object

Implementation of a simple timer.

Since:
0.1
Version:
0.1 (01-02-2000)
Author:
Andreas Rummler

Field Summary
protected  java.util.Date start
          Date holding the start time.
protected  long state
          Array with timer values.
protected  java.util.Date stop
          Date holding the stop time.
 
Constructor Summary
Timer()
           
 
Method Summary
 void reset()
          Resets the timer.
 void start()
          Starts the timer.
 void stop()
          Stops the timer.
 java.lang.String toString()
          Returns a string representation.
 long value()
          Gets the timer state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start

protected java.util.Date start
Date holding the start time.

stop

protected java.util.Date stop
Date holding the stop time.

state

protected long state
Array with timer values.
Constructor Detail

Timer

public Timer()
Method Detail

start

public void start()
Starts the timer.

stop

public void stop()
Stops the timer.

reset

public void reset()
Resets the timer.

value

public long value()
Gets the timer state. This method gets the current timer state, independant whether the timer is running or not.
Returns:
timer state

toString

public java.lang.String toString()
Returns a string representation. The returned string looks as follows: hhhh:mm:ss.cccc, where h stands for hours, m for minutes, s for seconds and c for milli seconds. Missing characters are filled with zeros.
Overrides:
toString in class java.lang.Object
Returns:
string representation

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS