Execution environment for events that synchronizes passing of time with the real-time (aka wall-clock time).
Execution environment for an event-based simulation which is synchronized with the real-time (also known as wall-clock time). A time step will take factor seconds of real time (one second by default). A step from 0 to 3 with a factor=0.5 will, for example, take at least 1.5 seconds.
The step() method will raise a RuntimeError if a time step took too long to compute. This behaviour can be disabled by setting strict to False.
Scaling factor of the real-time.
Running mode of the environment. step() will raise a RuntimeError if this is set to True and the processing of events takes too long.
The currently active process of the environment.
alias of AllOf
alias of AnyOf
alias of Event
Stop the current process, optionally providing a value.
This is a convenience function provided for Python versions prior to 3.3. From Python 3.3, you can instead use return value in a process.
The current simulation time.
alias of Process
Executes step() until the given criterion until is met.
Schedule an event with a given priority and a delay.
Synchronize the internal time with the current wall-clock time.
This can be useful to prevent step() from raising an error if a lot of time passes between creating the RealtimeEnvironment and calling run() or step().
alias of Timeout
Process the next event after enough real-time has passed for the event to happen.
The delay is scaled according to the real-time factor. With strict mode enabled, a RuntimeError will be raised, if the event is processed too slowly.