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, TaskFactory)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskFactory taskFactory)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
taskFactoryTaskFactoryTask factory used for creating and underlying timer task.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
intervalis less than 1 tick or greater than MaxValue milliseconds
Interval(ITimestampProvider, Duration, TaskFactory, Duration)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskFactory taskFactory, Duration spinWaitDurationHint)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
taskFactoryTaskFactoryTask factory used for creating and underlying timer task.
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, TaskFactory, Duration, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskFactory taskFactory, Duration spinWaitDurationHint, long count)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
taskFactoryTaskFactoryTask factory used for creating and underlying timer task.
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, TaskFactory, long)
Creates a new IntervalEventSource instance.
[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskFactory taskFactory, long count)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
intervalDurationInterval between subsequent timer events.
taskFactoryTaskFactoryTask factory used for creating and underlying timer task.
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, TaskFactory)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, TaskFactory taskFactory)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
timeoutDurationDelay before timer event is emitted.
taskFactoryTaskFactoryTask factory used for creating and underlying timer task.
Returns
- IntervalEventSource
New IntervalEventSource instance.
Exceptions
- ArgumentOutOfRangeException
When
timeoutis less than 1 tick or greater than MaxValue milliseconds.
Timeout(ITimestampProvider, Duration, TaskFactory, Duration)
Creates a new IntervalEventSource instance with a single emitted event.
[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, TaskFactory taskFactory, Duration spinWaitDurationHint)
Parameters
timestampProviderITimestampProviderTimestamp provider used for time tracking.
timeoutDurationDelay before timer event is emitted.
taskFactoryTaskFactoryTask factory used for creating and underlying timer task.
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.