learner
Class StopWatch

java.lang.Object
  extended by learner.StopWatch

public class StopWatch
extends java.lang.Object

A utility lass mimicking a stopwatch. Used to measure the time it takes for the Learner to infer the target language.


Field Summary
 boolean isRunning
          Is the stop watch currently running?
 
Constructor Summary
StopWatch()
          Constructs a stopwatch that is in the stopped state and has no time accumulated.
 
Method Summary
 long getElapsedTime()
          Returns the total elapsed time.
 void reset()
          Stops the watch and resets the elapsed time to 0.
 void start()
          Starts the stopwatch.
 void stop()
          Stops the stopwatch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isRunning

public boolean isRunning
Is the stop watch currently running?

Constructor Detail

StopWatch

public StopWatch()
Constructs a stopwatch that is in the stopped state and has no time accumulated.

Method Detail

start

public void start()
Starts the stopwatch. Time starts accumulating now.


stop

public void stop()
Stops the stopwatch. Time stops accumulating and is added to the elapsed time.


getElapsedTime

public long getElapsedTime()
Returns the total elapsed time.

Returns:
the total elapsed time

reset

public void reset()
Stops the watch and resets the elapsed time to 0.