Class ChronoEventSource
Creates instances of IntervalEventSource type.
public static class ChronoEventSource
- Inheritance
-
ChronoEventSource
- Inherited Members
Methods
Interval(Duration, Duration, ITimestampProvider?, ValueTaskDelaySource?)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(Duration interval, Duration spinWaitDurationHint, ITimestampProvider? timestampProvider = null, ValueTaskDelaySource? delaySource = null)
Parameters
intervalDurationInterval between subsequent timer events.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
timestampProviderITimestampProviderOptional timestamp provider used for time tracking.
delaySourceValueTaskDelaySourceOptional value task delay source to use for scheduling delays.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.
Interval(Duration, Duration, long, ITimestampProvider?, ValueTaskDelaySource?)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(Duration interval, Duration spinWaitDurationHint, long count, ITimestampProvider? timestampProvider = null, ValueTaskDelaySource? delaySource = null)
Parameters
intervalDurationInterval between subsequent timer events.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
countlongNumber of events underlying timers will emit in total. Equal to MaxValue by default.
timestampProviderITimestampProviderOptional timestamp provider used for time tracking.
delaySourceValueTaskDelaySourceOptional value task delay source to use for scheduling delays.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
countis less than 1 or whenintervalis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.
Interval(Duration, ITimestampProvider?, ValueTaskDelaySource?)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(Duration interval, ITimestampProvider? timestampProvider = null, ValueTaskDelaySource? delaySource = null)
Parameters
intervalDurationInterval between subsequent timer events.
timestampProviderITimestampProviderOptional timestamp provider used for time tracking.
delaySourceValueTaskDelaySourceOptional value task delay source to use for scheduling delays.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds
Interval(Duration, long, ITimestampProvider?, ValueTaskDelaySource?)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(Duration interval, long count, ITimestampProvider? timestampProvider = null, ValueTaskDelaySource? delaySource = null)
Parameters
intervalDurationInterval between subsequent timer events.
countlongNumber of events underlying timers will emit in total. Equal to MaxValue by default.
timestampProviderITimestampProviderOptional timestamp provider used for time tracking.
delaySourceValueTaskDelaySourceOptional value task delay source to use for scheduling delays.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
countis less than 1 or whenintervalis less than 1 tick or greater than MaxValue milliseconds.
Timeout(Duration, Duration, ITimestampProvider?, ValueTaskDelaySource?)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(Duration timeout, Duration spinWaitDurationHint, ITimestampProvider? timestampProvider = null, ValueTaskDelaySource? delaySource = null)
Parameters
timeoutDurationDelay before timer event is emitted.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
timestampProviderITimestampProviderOptional timestamp provider used for time tracking.
delaySourceValueTaskDelaySourceOptional value task delay source to use for scheduling delays.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.
Timeout(Duration, ITimestampProvider?, ValueTaskDelaySource?)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(Duration timeout, ITimestampProvider? timestampProvider = null, ValueTaskDelaySource? delaySource = null)
Parameters
timeoutDurationDelay before timer event is emitted.
timestampProviderITimestampProviderOptional timestamp provider used for time tracking.
delaySourceValueTaskDelaySourceOptional value task delay source to use for scheduling delays.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds.