<PackageReference Include="Polly" Version="2.2.7" />

SystemClock

public static class SystemClock
Time related delegates used to improve testability of the code
public static Action<TimeSpan> Sleep

Allows the setting of a custom Thread.Sleep implementation for testing. By default this will be a call to Sleep

public static Func<TimeSpan, Task> SleepAsync

Allows the setting of a custom async Sleep implementation for testing. By default this will be a call to Delay

public static Func<DateTime> UtcNow

Allows the setting of a custom DateTime.UtcNow implementation for testing. By default this will be a call to UtcNow

public static void Reset()

Resets the custom implementations to their defaults. Should be called during test teardowns.