You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
await sim.runAsync({ until?, batchSize?, signal? }) processes events in batches and yields to the event loop between them, so browser pages and servers stay responsive. Same result as run().
sim.runRealtime({ factor?, until? }) paces events to wall-clock time (factor = seconds per simulation unit) and returns a handle with pause(), resume(), stop(), setFactor(), isPaused, isActive and a done promise.
New 'progress' lifecycle event with { now, eventsProcessed, eventsInQueue }, emitted after every batch (async) or every event (real time).
Calling run(), runAsync() or runRealtime() while another run is in flight throws.
New exported types RunAsyncOptions, RealtimeOptions, RealtimeHandle, ProgressInfo.
The React integration guide shows a play/pause/speed control built on runRealtime.