Open cretz opened 1 month ago
There is now a .NET API for creating timers and getting current time. Leverage it. See https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider. Will have to see how it may affect versions we release packages for. https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.TimeProvider.Testing seems to support .NET 6 probably by way of Microsoft.Bcl.TimeProvider inclusion.
Microsoft.Bcl.TimeProvider
Note, while we should provide a Workflow.TimeProvider property, there does not seem to be an obvious way to change the default time provider.
Workflow.TimeProvider
there does not seem to be an obvious way to change the default time provider.
Nor should we, I think (other than to just make it throw an error), consistent with the idea that we probably want to avoid magic.
Describe the solution you'd like
There is now a .NET API for creating timers and getting current time. Leverage it. See https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider. Will have to see how it may affect versions we release packages for. https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.TimeProvider.Testing seems to support .NET 6 probably by way of
Microsoft.Bcl.TimeProvider
inclusion.Note, while we should provide a
Workflow.TimeProvider
property, there does not seem to be an obvious way to change the default time provider.