cds.util
Class Chrono

java.lang.Object
  extended bycds.util.Chrono

public class Chrono
extends java.lang.Object

Class allowing time measurements in a programme. A Chrono object can be started, stopped and can display its value


Field Summary
private  long debut
           
private  long duree
           
 
Constructor Summary
Chrono()
          Constructor and Chronometer start
 
Method Summary
 void start()
          Starts the chronometer
 long stop()
          Stops the chronometer.
 java.lang.String toString()
           
 double val(java.lang.String type)
          Returns the value of the Chronometer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debut

private long debut

duree

private long duree
Constructor Detail

Chrono

public Chrono()
Constructor and Chronometer start

Method Detail

start

public void start()
Starts the chronometer


stop

public long stop()
Stops the chronometer. Several stops can be performed sequentially, and will refer to the same initial start. After a stop(), a method val() will display the time after the last stop().

Returns:
the elapsed time since the previous start().

val

public double val(java.lang.String type)
Returns the value of the Chronometer

Parameters:
type - type of value: M=milliseconds, S=seconds
Returns:
the elapsed time since the previous start()

toString

public java.lang.String toString()