|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.core.Chrono
public class Chrono
Simple timing class, used for timing one or more trials of an event.
The trials must be timed consecutively, so start or
stop cannot be called twice in a row.
| Constructor Summary | |
|---|---|
Chrono(String name)
Creates a new instance of a Chrono timer. |
|
Chrono(String name,
Logger logger)
Creates a new instance of a Chrono timer. |
|
Chrono(String name,
Logger logger,
int startInfoId,
int stopInfoId)
Creates a new instance of a Chrono timer. |
|
| Method Summary | |
|---|---|
void |
disable()
Disables the timer. |
void |
enable()
Enables the timer, so that calls to start and
stop gather more timing information. |
double |
getAverageSeconds()
|
double |
getTotalSeconds()
|
int |
getTrialCount()
|
void |
reset()
Resets the counters to start timing from scratch. |
void |
start()
Starts a trial. |
void |
stop()
Stops timing the current trial. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Chrono(String name)
Chrono timer.
name - the name of the event. Used by toString()
to print out the timing summary.
public Chrono(String name,
Logger logger)
Chrono timer.
name - the name of the event. Used by toString()
to print out the timing summary.logger - the Logger to use to print debug statements
public Chrono(String name,
Logger logger,
int startInfoId,
int stopInfoId)
Chrono timer.
name - the name of the event. Used by toString()
to print out the timing summary.logger - the Logger to use to print debug statementsstartInfoId - id of a resource for logging an INFO start message to logger.stopInfoId - id of a resource for logging an INFO stop message to logger.| Method Detail |
|---|
public void reset()
public void start()
stop.
public void stop()
public void enable()
start and
stop gather more timing information.
public void disable()
start and
stop will have no effect on timing information.
public double getTotalSeconds()
public double getAverageSeconds()
public int getTrialCount()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||