com.cbse.jeasy
Class JETimer

java.lang.Object
  extended by com.cbse.jeasy.JETimer

public class JETimer
extends java.lang.Object

A stopwatch giving the time in sec, msec and mikrosec Because it is allways synchronized with the systen time when starting the watch the timer needs until 15 msec for itself. But the tine between start and stop is then given exactly.

Version:
%I%, %G%
Author:
H.Pfohl

Constructor Summary
JETimer()
          Initializes the Timer
 
Method Summary
 double getTimeInMs()
          Gets the time im ms as a double
 long startTimer(java.lang.String label)
          Starts the timer when the system time changes (all 15 msec on an standard PC)
 long stopTimer()
          Stops the timer and gives back the System.currentTimeMillis when stopping.
 java.lang.String stopTimerAndGet()
          Stops the timer and gives back a formatted String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JETimer

public JETimer()
Initializes the Timer

Method Detail

startTimer

public long startTimer(java.lang.String label)
Starts the timer when the system time changes (all 15 msec on an standard PC)

Parameters:
label - used for formatted output
Returns:

stopTimerAndGet

public java.lang.String stopTimerAndGet()
Stops the timer and gives back a formatted String

Returns:

stopTimer

public long stopTimer()
Stops the timer and gives back the System.currentTimeMillis when stopping. It returns when the system time changes (all 15 msec):

Returns:
system time

getTimeInMs

public double getTimeInMs()
Gets the time im ms as a double

Returns: