Describe the bug
For the following code:
PolicyResult result = await Policy.TimeoutAsync(5).ExecuteAndCaptureAsync(async (ct) =>
{
await Task.Delay(TimeSpan.FromSeconds(10), ct);
}, CancellationToken.None);
Console.WriteLine(((TimeoutRejectedException)result.FinalException).Timeout);
Console.ReadLine();
Expected behavior
I expect the console output to be
00:00:05.0000000
Or at least something within reasonable error around the value of 5 seconds.
Actual behavior
It is instead -00:00:00.0010000.
Polly version
8.6.4
.NET Version
.NET 10
Anything else
I hope this is not me misunderstanding the usage...but honestly I have no idea where the value -0.001 seconds is coming from.
Describe the bug
For the following code:
Expected behavior
I expect the console output to be
00:00:05.0000000Or at least something within reasonable error around the value of 5 seconds.
Actual behavior
It is instead
-00:00:00.0010000.Polly version
8.6.4
.NET Version
.NET 10
Anything else
I hope this is not me misunderstanding the usage...but honestly I have no idea where the value -0.001 seconds is coming from.