Class Clock
java.lang.Object
eds.framework.Clock
Singleton clock.
The Clock class maintains the current simulation time.
Only one instance of this class exists during execution.
The time value is represented as a double.
-
Method Details
-
getInstance
Returns the single instance of the Clock. If the instance does not exist yet, it is created.- Returns:
- the singleton Clock instance
-
setTime
public void setTime(double time) Sets the current simulation time.- Parameters:
time- the new simulation time
-
getTime
public double getTime()Returns the current simulation time.- Returns:
- current simulation time
-