Class SynchronizeToRealTime

  • All Implemented Interfaces:
    java.lang.Cloneable, Initializable, TimeRegulator, Changeable, Debuggable, DebugListener, Derivable, HierarchyListener, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class SynchronizeToRealTime
    extends AbstractInitializableAttribute
    implements TimeRegulator
    Attribute that regulates the passage of time to wait for real time to catch up.

    The scaleFactor parameter is here to set up how many seconds in wallclock time should pass for a single second in model time. So a scale factor of 0.5 will make the model time passes twice as fast as real time, while make it equals 2 means that 2 seconds in wallclock are needed for a single unit of time in the model.

    The default value is 1.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Edward A. Lee, Gilles Lasnier, Patricia Derler
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • scaleFactor

        public Parameter scaleFactor
        How many seconds in wallclock time should pass for a single second in model time. So a scaleFactor of 0.5 will make the model time passes twice as fast as real time, while make it equals 2 means that 2 seconds in wallclock are needed for a single unit of time in the model. The default value is 1.0.
    • Method Detail

      • noNewActors

        public boolean noNewActors()
        This class does not create change request for new actor in proposeTime. Always return true then.
        Specified by:
        noNewActors in interface TimeRegulator
        Returns:
        false is ChangeRequest has been queued for a new actor