planet.util.timer
Class ControlTimer

java.lang.Object
  extended by planet.util.timer.ControlTimer

public class ControlTimer
extends java.lang.Object

This class has all its members statics to permit in a simulation envirionment controls all timers and to inform them of the actual step of simulation.

Author:
Jordi Pujol Date: 05/05/2004

Field Summary
static int currentStep
          Actual step of simulation.
 
Constructor Summary
ControlTimer()
           
 
Method Summary
static void add(SimulationTimer timer)
          Adds the specified timer to current timers.
static void currentStep(int step)
          Iterate for all active Timers to inform the actual step.
static void init()
          Initialize the ControlTimer to permit adding Timers.
static void setCurrentStep(int step)
          Sets the current step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentStep

public static int currentStep
Actual step of simulation.

Constructor Detail

ControlTimer

public ControlTimer()
Method Detail

init

public static void init()
Initialize the ControlTimer to permit adding Timers. It must be invoked before its fully use.


add

public static void add(SimulationTimer timer)
Adds the specified timer to current timers.

Parameters:
timer - SimulationTimer to advise each time.

currentStep

public static void currentStep(int step)
Iterate for all active Timers to inform the actual step.

Parameters:
step - Actual simulation step.

setCurrentStep

public static void setCurrentStep(int step)
Sets the current step.

Parameters:
step - Current step