Class DevsRealTimeAnimator.TimeFloatUnit

java.lang.Object
org.djutils.event.LocalEventProducer
All Implemented Interfaces:
Serializable, Runnable, Remote, AnimatorInterface, DevsSimulatorInterface<org.djunits.value.vfloat.scalar.FloatDuration>, SimulatorInterface<org.djunits.value.vfloat.scalar.FloatDuration>, org.djutils.event.EventProducer
Enclosing class:
DevsRealTimeAnimator<T extends Number & Comparable<T>>

public static class DevsRealTimeAnimator.TimeFloatUnit extends DevsRealTimeAnimator<org.djunits.value.vfloat.scalar.FloatDuration> implements DevsSimulatorInterface<org.djunits.value.vfloat.scalar.FloatDuration>
Easy access class RealTimeClock<FloatDuration>.
See Also:
  • Constructor Details

    • TimeFloatUnit

      public TimeFloatUnit(Serializable id)
      Construct a DevsRealTimeClock<FloatDuration>.
      Parameters:
      id - the id of the simulator, used in logging and firing of events.
  • Method Details

    • simulatorTimeForWallClockMillis

      public org.djunits.value.vfloat.scalar.FloatDuration simulatorTimeForWallClockMillis(double wallMilliseconds)
      Calculate the how much simulation duration corresponds to the number of wall clock milliseconds indicated in the parameter. When the DevsRealTimeClock works with djunits Time or Duration, and the simulation is scaled to milliseconds, the simulatorTimeForWallClockMillis of a millisecond is a Duration of 1 millisecond. When 1 simulated time unit stands for a second, the simulatorTimeForWallClockMillis is 0.001.
      Specified by:
      simulatorTimeForWallClockMillis in class DevsRealTimeAnimator<org.djunits.value.vfloat.scalar.FloatDuration>
      Parameters:
      wallMilliseconds - double; the number of milliseconds to calculate the corresponding simulation time for
      Returns:
      the relative time step.