Class SimulationClock


  • public class SimulationClock
    extends Object
    This class represents the simulation clock. The simulation clock is a double value that represents the current time of the simulation.
    • Field Detail

      • time

        protected double time
        The current time of the simulation.
    • Constructor Detail

      • SimulationClock

        public SimulationClock​(double time)
        Creates a new simulation clock with the given initial time.
        Parameters:
        time - the initial time of the simulation.
      • SimulationClock

        public SimulationClock()
        Creates a new simulation clock with initial time 0.
    • Method Detail

      • getTime

        public double getTime()
        Gets the current simulation time.
        Returns:
        the current simulation time.
      • setTime

        public void setTime​(double time)
        Sets the current simulation time.
        Parameters:
        time - the new simulation time.