Table of Contents

Class NodaDurationBclConversion

Namespace
KZDev.PrimeTime
Assembly
KZDev.PrimeTime.dll

Centralizes NodaTime.Duration to BCL TimeSpan conversions for the Noda stack so delays, cancellation timers, interval registration, and virtual clock advances stay aligned with TimeSpan-based IPrimeClock members and avoid OverflowException.

public static class NodaDurationBclConversion
Inheritance
NodaDurationBclConversion

Methods

ToTimeSpanForCancellationToken(Duration)

Converts a NodaTime.Duration to TimeSpan for CancellationTokenSource timer limits.

ToTimeSpanForDelay(Duration)

Converts a NodaTime.Duration to TimeSpan for BCL delay APIs (Sleep(TimeSpan), Delay(TimeSpan), and related).

ToTimeSpanForTimerInterval(Duration)

Converts a NodaTime.Duration to TimeSpan for interval timer registration, timer Change operations, and virtual clock deltas so behavior matches IPrimeClock TimeSpan-based timer registration overloads.