utilities
Class Clock

java.lang.Object
  |
  +--utilities.Clock

public class Clock
extends java.lang.Object

Keeps track of the simulation time


Method Summary
static Clock getClock()
          Returns the simulation clock
 java.awt.Label getLabel()
          Gets the clocks component label
static int getTime()
          Returns the current time
static void reset()
          Resets the clock
static void setTime(int t)
          Sets the time
static void tick()
          Increments the clock.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClock

public static Clock getClock()
Returns the simulation clock

reset

public static void reset()
Resets the clock

tick

public static void tick()
Increments the clock. This should be called by non-simulator objects, such as an agent.

setTime

public static void setTime(int t)
Sets the time
Parameters:
t - The time

getTime

public static int getTime()
Returns the current time
Returns:
The time

getLabel

public java.awt.Label getLabel()
Gets the clocks component label
Returns:
The label