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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
interval
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
spinWaitDurationHint
DurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
interval
is less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHint
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
spinWaitDurationHint
DurationSpinWait duration hint for underlying timers.
count
longNumber of events underlying timers will emit in total. Equal to MaxValue by default.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
count
is less than 1 or wheninterval
is less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHint
is less than 0.
Interval(ITimestampProvider, Duration, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, long count)
Parameters
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
count
longNumber of events underlying timers will emit in total. Equal to MaxValue by default.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
count
is less than 1 or wheninterval
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
scheduler
TaskSchedulerTask scheduler.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
interval
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
scheduler
TaskSchedulerTask scheduler.
spinWaitDurationHint
DurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
interval
is less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHint
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
scheduler
TaskSchedulerTask scheduler.
spinWaitDurationHint
DurationSpinWait duration hint for underlying timers.
count
longNumber of events underlying timers will emit in total. Equal to MaxValue by default.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
count
is less than 1 or wheninterval
is less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHint
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
interval
DurationInterval between subsequent timer events.
scheduler
TaskSchedulerTask scheduler.
count
longNumber of events underlying timers will emit in total. Equal to MaxValue by default.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
count
is less than 1 or wheninterval
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
timeout
DurationDelay before timer event is emitted.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeout
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
timeout
DurationDelay before timer event is emitted.
spinWaitDurationHint
DurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeout
is less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHint
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
timeout
DurationDelay before timer event is emitted.
scheduler
TaskSchedulerTask scheduler.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeout
is 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
timestampProvider
ITimestampProviderTimestamp provider used for time tracking.
timeout
DurationDelay before timer event is emitted.
scheduler
TaskSchedulerTask scheduler.
spinWaitDurationHint
DurationSpinWait duration hint for underlying timers.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeout
is less than 1 tick or greater than MaxValue milliseconds or whenspinWaitDurationHint
is less than 0.