rcs.nml
Class time_tracker

java.lang.Object
  extended by rcs.nml.time_tracker
All Implemented Interfaces:
java.lang.Cloneable

public class time_tracker
extends java.lang.Object
implements java.lang.Cloneable

Simple class to track wall-clock performance time. All times are given in seconds but precise to .001 s. (Exact accuracy depends on Operating System, JRE etc ) Absolute times are in seconds since Jan,1 1970 UTC aka "unix time" although see the pages for System.currentTimeMillis()


Field Summary
 double avg
          Average difference in time between consecutive calls to cycle().
 int count
          Number of times cycle was called since last reset.
 double elapsed
          Current time minus start.
 double last
          Last time cycle was called
 double max
          Maximum difference in time between consecutive calls to cycle()
 double min
          Minimum difference in time between consecutive calls to cycle()
 double now
          Current time when cycle was called.
 double start
          Time when constructed or reset.
 
Constructor Summary
time_tracker()
           
 
Method Summary
 time_tracker clone()
           
 void cycle()
          Called periodically to measure the wall clock statistics of a periodic function.
 void reset()
          Reset all statistics and start the clock from now.
 java.lang.String toString()
           
 void update(NMLFormatConverter nml_fc)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

public int count
Number of times cycle was called since last reset.


last

public double last
Last time cycle was called


now

public double now
Current time when cycle was called.


start

public double start
Time when constructed or reset.


elapsed

public double elapsed
Current time minus start.


min

public double min
Minimum difference in time between consecutive calls to cycle()


max

public double max
Maximum difference in time between consecutive calls to cycle()


avg

public double avg
Average difference in time between consecutive calls to cycle().

Constructor Detail

time_tracker

public time_tracker()
Method Detail

reset

public void reset()
Reset all statistics and start the clock from now.


cycle

public void cycle()
Called periodically to measure the wall clock statistics of a periodic function.


update

public void update(NMLFormatConverter nml_fc)

clone

public time_tracker clone()
                   throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object