<PackageReference Include="Polly.Core" Version="8.0.0-alpha.1" />

TimeProvider

abstract class TimeProvider
TEMPORARY ONLY, to be replaced with System.TimeProvider - https://github.com/dotnet/runtime/issues/36617 later.
public static TimeProvider System { get; }

public long TimestampFrequency { get; }

public abstract DateTimeOffset UtcNow { get; }

protected TimeProvider(long timestampFrequency)

public abstract void CancelAfter(CancellationTokenSource source, TimeSpan delay)

public abstract Task Delay(TimeSpan delay, CancellationToken cancellationToken = default)

public TimeSpan GetElapsedTime(long startingTimestamp, long endingTimestamp)

public TimeSpan GetElapsedTime(long startingTimestamp)

public abstract long GetTimestamp()