edu.buffalo.fs7.mathlib
Class Timing

java.lang.Object
  |
  +--edu.buffalo.fs7.mathlib.Timing

public class Timing
extends java.lang.Object

Class providing timing functionality for gate operations.


Constructor Summary
Timing()
          creates a timing object and initializes it
 
Method Summary
 double getAvgTimePerStepMillis()
          returns the average time per gate in milliseconds
 double getElapsedTimeSec()
          returns the total elapsed time in seconds
 double getTimeEstimateForStepsSec(int steps)
          returns a time estimate for the given number of steps based on the average time per step.
 boolean isTiming()
          returns whether the object is currently timing
 void reset()
          reset the internal values
 void start()
          starts the timing process
 void stepsAccomplished(int stepsAcc)
          sets the number of steps accomplished in the last timing interval
 void stop()
          stops the timing process
 void stop(int stepsAcc)
          combines the stop() and stepsAccomplished(int) methods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timing

public Timing()
creates a timing object and initializes it
Method Detail

reset

public void reset()
reset the internal values

start

public void start()
starts the timing process

stop

public void stop()
stops the timing process

stepsAccomplished

public void stepsAccomplished(int stepsAcc)
sets the number of steps accomplished in the last timing interval

stop

public void stop(int stepsAcc)
combines the stop() and stepsAccomplished(int) methods

isTiming

public boolean isTiming()
returns whether the object is currently timing

getElapsedTimeSec

public double getElapsedTimeSec()
returns the total elapsed time in seconds

getAvgTimePerStepMillis

public double getAvgTimePerStepMillis()
returns the average time per gate in milliseconds

getTimeEstimateForStepsSec

public double getTimeEstimateForStepsSec(int steps)
returns a time estimate for the given number of steps based on the average time per step.