Class ChronoEventSource
Creates instances of IntervalEventSource type.
public static class ChronoEventSource
- Inheritance
-
ChronoEventSource
- Inherited Members
Methods
Interval(ITimestampProvider, Duration)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds
Interval(ITimestampProvider, Duration, Duration)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, Duration spinWaitDurationHint)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.
Interval(ITimestampProvider, Duration, Duration, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, Duration spinWaitDurationHint, long count)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
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.
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(ITimestampProvider, Duration, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, long count)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
countlongNumber of events underlying timers will emit in total. Equal to MaxValue by default.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
countis less than 1 or whenintervalis less than 1 tick or greater than MaxValue milliseconds.
Interval(ITimestampProvider, Duration, TaskScheduler)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
schedulerTaskSchedulerTask scheduler.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds
Interval(ITimestampProvider, Duration, TaskScheduler, Duration)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler, Duration spinWaitDurationHint)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
schedulerTaskSchedulerTask scheduler.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.
Interval(ITimestampProvider, Duration, TaskScheduler, Duration, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler, Duration spinWaitDurationHint, long count)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
schedulerTaskSchedulerTask scheduler.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
countlongNumber of events underlying timers will emit in total. Equal to MaxValue by default.
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(ITimestampProvider, Duration, TaskScheduler, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler, long count)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
schedulerTaskSchedulerTask scheduler.
countlongNumber of events underlying timers will emit in total. Equal to MaxValue by default.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
countis less than 1 or whenintervalis less than 1 tick or greater than MaxValue milliseconds.
Timeout(ITimestampProvider, Duration)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
timeoutDurationDelay before timer event is emitted.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds.
Timeout(ITimestampProvider, Duration, Duration)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, Duration spinWaitDurationHint)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
timeoutDurationDelay before timer event is emitted.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.
Timeout(ITimestampProvider, Duration, TaskScheduler)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, TaskScheduler scheduler)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
timeoutDurationDelay before timer event is emitted.
schedulerTaskSchedulerTask scheduler.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds.
Timeout(ITimestampProvider, Duration, TaskScheduler, Duration)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, TaskScheduler scheduler, Duration spinWaitDurationHint)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
timeoutDurationDelay before timer event is emitted.
schedulerTaskSchedulerTask scheduler.
spinWaitDurationHintDurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHintis less than 0.