Class Clock
java.lang.Object
simu.framework.Clock
The Clock class is a singleton that keeps track of the simulation time.
It provides methods to set and get the current time.
-
Method Details
-
getInstance
Returns the singleton instance of the Clock. If the instance does not exist, it creates one.- Returns:
- the singleton instance of the Clock
-
setTime
public void setTime(double time) Sets the current time of the Clock.- Parameters:
time- the new time to set
-
getTime
public double getTime()Returns the current time of the Clock.- Returns:
- the current time
-