Method Start
Start(Duration?)
Starts the deadline-driven automatic runner at the given virtual-time-per-real-second rate.
public void Start(Duration? perSecondRate = null)
Parameters
perSecondRateDuration?Virtual time that elapses per one real second, or
nullfor 1:1.
Remarks
Forwards to Start(TimeSpan?) after converting
perSecondRate. See that member for runner semantics, rate bounds, projection, and
persist-on-read.
Exceptions
- ArgumentOutOfRangeException
Thrown when
perSecondRateis notnulland its BCL conversion is outside 100 milliseconds to 1 hour of virtual time per real second (inclusive).
Start(TimeSpan?)
Starts a background runner that advances virtual time toward the next delay, time-expiry, timer due instant, or virtual-minute ClockEvents heartbeat, scaled by the run rate.
public void Start(TimeSpan? perSecondRate = null)
Parameters
perSecondRateTimeSpan?Virtual time that elapses per one real second, or
nullfor 1 second of virtual time per real second.
Remarks
When already running, this method has no effect. While running, IsRunning is
true, "now" getters project from a committed instant plus a monotonic anchor, and
Stop() stops projection and joins the runner thread.
The runner does not use a fixed one-second poll. It computes intended real sleep from the next virtual deadline, skips real sleeps shorter than 15 ms by processing virtual steps in-process, wakes on scheduling changes and persist-on-read, and after a real wait applies virtual elapsed from measured anchor elapsed time (oversleep catch-up).
Exceptions
- ArgumentOutOfRangeException
Thrown when
perSecondRateis notnulland is less than 100 milliseconds or greater than 1 hour of virtual time per real second (no clamping).