avrora.sim
Class Simulator.ClockCycleTimeout

java.lang.Object
  extended byavrora.sim.Simulator.ClockCycleTimeout
All Implemented Interfaces:
Simulator.Trigger
Enclosing class:
Simulator

public static class Simulator.ClockCycleTimeout
extends java.lang.Object
implements Simulator.Trigger

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 trigger 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

timeout

public final long timeout
Constructor Detail

Simulator.ClockCycleTimeout

public Simulator.ClockCycleTimeout(long t)
The constructor for InstructionCountTimeout creates a timeout trigger with the specified initial value.

Parameters:
t - the number of cycles in the future
Method Detail

fire

public void fire()
The fire() method is called when the timeout is up.

Specified by:
fire in interface Simulator.Trigger