|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.omegahat.Environment.lib.Language.TimedEvaluation
Class used to time a particular computation, be in an interpreted expression or a regular Java call.
TimedExpressionEvaluation| Field Summary | |
static int |
START
Symbolic constant identifying the position in the array of times identifying the starting time. |
static int |
STOP
Symbolic constant identifying the position in the array of times identifying the finishing time. |
protected long[] |
times
Array storing the starting and ending time. |
| Constructor Summary | |
TimedEvaluation()
|
|
| Method Summary | |
long |
duration()
Method to compute the total amount of time taken. |
java.lang.Object |
eval(Evaluable expression,
Evaluator evaluator)
Evaluates the specified expression, noting the starting and stopping times in the times array. |
long |
getStart()
Method to access the time the computation started. |
long |
getStop()
Method to access the time the evaluation concluded. |
long |
start()
Imperative indicating that the current time should be stored as the time the evaluation was complete. |
long |
stop()
Imperative indicating that the current time should be stored as the time the evaluation was complete. |
long[] |
times()
Accessor for the times array. |
protected long[] |
times(long[] t)
Internal accessor for specifying the times array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int START
public static int STOP
protected long[] times
| Constructor Detail |
public TimedEvaluation()
| Method Detail |
public long start()
public long stop()
public java.lang.Object eval(Evaluable expression,
Evaluator evaluator)
throws java.lang.Throwable
times array.
Even if an exception is throw, the time is still valid.public long getStart()
public long getStop()
public long duration()
public long[] times()
times array.protected long[] times(long[] t)
times array.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||