|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.sim.Simulator.ClockCycleTimeout
The InstructionCountTimeout class is a probe that simply counts down and throws an
exception when the count reaches zero. It is useful for ensuring termination of the simulator, for
performance testing, or for profiling and stopping after a specified number of invocations.
| Field Summary | |
long |
timeout
|
| Constructor Summary | |
Simulator.ClockCycleTimeout(long t)
The constructor for InstructionCountTimeout creates a timeout event with the specified
initial value. |
|
| Method Summary | |
void |
fire()
The fire() method is called when the timeout is up. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final long timeout
| Constructor Detail |
public Simulator.ClockCycleTimeout(long t)
InstructionCountTimeout creates a timeout event with the specified
initial value.
t - the number of cycles in the future| Method Detail |
public void fire()
fire() method is called when the timeout is up. It gathers the state from the
simulator and throws an instance of Simulator.TimeoutException that signals that the
timeout has been reached. This exception then falls through the run() method of the
caller of the simulator.
fire in interface Simulator.Event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||