Polly.Utilities.SystemClock
Time related delegates used to support different compilation targets and to improve testability of the code.
namespace Polly.Utilities
{
public static class SystemClock
{
public static Action<TimeSpan, CancellationToken> Sleep;
public static Func<TimeSpan, CancellationToken, Task> SleepAsync;
public static Func<DateTime> UtcNow;
public static Func<DateTimeOffset> DateTimeOffsetUtcNow;
public static Action<CancellationTokenSource, TimeSpan> CancelTokenAfter;
public static void Reset();
}
}