weka.core.parser.JFlex
Class Timer

java.lang.Object
  extended by weka.core.parser.JFlex.Timer

public class Timer
extends java.lang.Object

Very simple timer for code generation time statistics. Not very exact, measures user time, not processor time.

Version:
JFlex 1.4.1, $Revision: 1.1 $, $Date: 2008-05-09 09:14:11 $
Author:
Gerwin Klein

Constructor Summary
Timer()
          Construct a new timer that starts immediatly.
 
Method Summary
 long diff()
          Return the number of milliseconds the timer has been running.
 void start()
          Start the timer.
 void stop()
          Stop the timer.
 java.lang.String toString()
          Return a string representation of the timer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timer

public Timer()
Construct a new timer that starts immediatly.

Method Detail

start

public void start()
Start the timer. If it is already running, the old start time is lost.


stop

public void stop()
Stop the timer.


diff

public long diff()
Return the number of milliseconds the timer has been running. (up till now, if it still runs, up to the stop time if it has been stopped)


toString

public java.lang.String toString()
Return a string representation of the timer.

Overrides:
toString in class java.lang.Object
Returns:
a string displaying the diff-time in readable format (h m s ms)
See Also:
diff()