An important event type is the Timeout. Events of this type are triggered after a certain amount of (simulated) time has passed. They allow a process to sleep (or hold its state) for the given time. A Timeout and all other events can be created by calling the appropriate method of the Environment that the process lives in (Environment.timeout() for example).
FlatQueue.js imported from https://github.com/mourner/flatqueue.
This library has been inspired in the Python library Simpy https://simpy.readthedocs.io
simJS | process-based discrete-event simulation framework