Class PrimeClockTimerExtensions
- Namespace
- KZDev.SystemClock.PrimeTime
- Assembly
- KZDev.SystemClock.PrimeTime.dll
Extension methods for IPrimeClock interval and (when targeting .NET with day-time APIs) time-of-day timers. These provide convenient overloads for common timer registration patterns, such as repeating timers and callbacks that do not require context or cancellation tokens.
public static class PrimeClockTimerExtensions
- Inheritance
-
PrimeClockTimerExtensions
Remarks
Time-of-day extension overloads that take LocalTimeOfDay or UtcTimeOfDay are emitted
only under the SDK NET symbol (see remarks on IPrimeClock). They are not
available when targeting .NET Standard 2.0 or .NET Framework, even if online API reference lists them.
Methods
- RegisterAsyncTimeOfDay(IPrimeClock, LocalTimeOfDay, Func<CancellationToken, ValueTask>, CancellationToken, DayTimeTimerOptions?)
Registers a time-of-day timer with an asynchronous callback.
- RegisterAsyncTimeOfDay(IPrimeClock, UtcTimeOfDay, Func<CancellationToken, ValueTask>, CancellationToken, DayTimeTimerOptions?)
Registers a UTC time-of-day timer with an asynchronous callback.
- RegisterAsyncTimer(IPrimeClock, TimeSpan, Func<ClockTimerCallbackContext, CancellationToken, ValueTask>, CancellationToken, object?, bool, IntervalTimerOptions?)
Registers a one-shot or repeating interval timer with an asynchronous callback that receives context and cancellation token.
- RegisterAsyncTimer(IPrimeClock, TimeSpan, Func<CancellationToken, ValueTask>, CancellationToken, bool, IntervalTimerOptions?)
Registers a one-shot or repeating interval timer with an asynchronous callback.
- RegisterAsyncTimer(IPrimeClock, TimeSpan, TimeSpan, Func<CancellationToken, ValueTask>, CancellationToken, IntervalTimerOptions?)
Registers an interval timer with an initial delay and a separate repeat interval (async callback).
- RegisterTimeOfDay(IPrimeClock, LocalTimeOfDay, Action, CancellationToken, DayTimeTimerOptions?)
Registers a time-of-day timer that fires at the given local time each day (sync callback).
- RegisterTimeOfDay(IPrimeClock, LocalTimeOfDay, Action<ClockTimerCallbackContext, CancellationToken>, CancellationToken, object?, DayTimeTimerOptions?)
Registers a time-of-day timer with a callback that receives context and cancellation token.
- RegisterTimeOfDay(IPrimeClock, UtcTimeOfDay, Action, CancellationToken, DayTimeTimerOptions?)
Registers a time-of-day timer that fires at the given UTC time each day (sync callback).
- RegisterTimeOfDay(IPrimeClock, UtcTimeOfDay, Action<ClockTimerCallbackContext, CancellationToken>, CancellationToken, object?, DayTimeTimerOptions?)
Registers a UTC time-of-day timer with a callback that receives context and cancellation token.
- RegisterTimer(IPrimeClock, TimeSpan, Action, CancellationToken, bool, IntervalTimerOptions?)
Registers a one-shot or repeating interval timer with a synchronous callback.
- RegisterTimer(IPrimeClock, TimeSpan, Action<ClockTimerCallbackContext, CancellationToken>, CancellationToken, object?, bool, IntervalTimerOptions?)
Registers a one-shot or repeating interval timer with a synchronous callback that receives context and cancellation token.
- RegisterTimer(IPrimeClock, TimeSpan, Action<ClockTimerCallbackContext>, CancellationToken, object?, bool, IntervalTimerOptions?)
Registers a one-shot or repeating interval timer with a synchronous callback that receives context and state.
- RegisterTimer(IPrimeClock, TimeSpan, TimeSpan, Action, CancellationToken, IntervalTimerOptions?)
Registers an interval timer with an initial delay and a separate repeat interval (sync callback).
- RegisterTimer(IPrimeClock, TimeSpan, TimeSpan, Action<ClockTimerCallbackContext, CancellationToken>, CancellationToken, object?, IntervalTimerOptions?)
Registers an interval timer with an initial delay and a separate repeat interval (sync callback with context and token).