Interface IPrimeClock
- Namespace
- KZDev.SystemClock.PrimeTime
- Assembly
- KZDev.SystemClock.PrimeTime.dll
System Clock–specific members for IPrimeClock (BCL local calendar scheduling).
public interface IPrimeClock : IPrimeTime
- Inherited Members
- Extension Methods
Remarks
Only supported in .NET 8+. Not supported in NetStandard 2.0.
Properties
- LocalNowDateOnly
Gets the current local date as DateOnly.
- LocalNowDateTime
Gets the current local date and time as a DateTime.
- LocalNowDateTimeOffset
Gets the current local date and time as a DateTimeOffset.
- LocalNowTimeOnly
Gets the current local time-of-day as TimeOnly.
- LocalScheduleTimeZone
Gets the time zone used to resolve the local calendar date and local wall-clock time for local day-time timer registration (BCL time-of-day surface when available).
- UtcNowDateOnly
Gets the current UTC date as DateOnly.
- UtcNowDateTime
Gets the current UTC date and time as a DateTime.
- UtcNowDateTimeOffset
Gets the current UTC date and time as a DateTimeOffset.
- UtcNowTimeOnly
Gets the current UTC time-of-day as TimeOnly.
Methods
- RegisterAsyncTimeOfDay(LocalTimeOfDay, Func<ClockTimerCallbackContext, CancellationToken, ValueTask>, CancellationToken, object?, DayTimeTimerOptions?)
Registers a local time-of-day timer with an asynchronous callback that receives timer context and cancellation token. Other
RegisterAsyncTimeOfDayoverloads for LocalTimeOfDay are provided as extension methods.
- RegisterAsyncTimeOfDay(UtcTimeOfDay, Func<ClockTimerCallbackContext, CancellationToken, ValueTask>, CancellationToken, object?, DayTimeTimerOptions?)
Registers a UTC time-of-day timer with an asynchronous callback that receives timer context and cancellation token. Other
RegisterAsyncTimeOfDayoverloads for UtcTimeOfDay are provided as extension methods.
- RegisterAsyncTimer(TimeSpan, TimeSpan, Func<ClockTimerCallbackContext, CancellationToken, ValueTask>, CancellationToken, object?, IntervalTimerOptions?)
Registers an interval timer with an initial delay, a repeat interval, and an asynchronous callback that receives timer context and cancellation token. Other
RegisterAsyncTimeroverloads are provided as extension methods.
- RegisterTimeOfDay(LocalTimeOfDay, Action<ClockTimerCallbackContext>, CancellationToken, object?, DayTimeTimerOptions?)
Registers a local time-of-day timer with a synchronous callback that receives timer context and optional state. Other
RegisterTimeOfDayoverloads for LocalTimeOfDay are provided as extension methods.
- RegisterTimeOfDay(UtcTimeOfDay, Action<ClockTimerCallbackContext>, CancellationToken, object?, DayTimeTimerOptions?)
Registers a UTC time-of-day timer with a synchronous callback that receives timer context and optional state. Other
RegisterTimeOfDayoverloads for UtcTimeOfDay are provided as extension methods.
- RegisterTimer(TimeSpan, TimeSpan, Action<ClockTimerCallbackContext>, CancellationToken, object?, IntervalTimerOptions?)
Registers an interval timer with an initial delay, a repeat interval, and a synchronous callback that receives timer context. Other
RegisterTimeroverloads are provided as extension methods.