Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .NET TimeProvider and deprecate IClock #17290

Open
Piedone opened this issue Dec 30, 2024 · 6 comments
Open

Use .NET TimeProvider and deprecate IClock #17290

Piedone opened this issue Dec 30, 2024 · 6 comments
Milestone

Comments

@Piedone
Copy link
Member

Piedone commented Dec 30, 2024

Is your feature request related to a problem?

From the 17th December meeting: We now have TimeProvider in .NET, which is much of the same as our IClock (and more, since it also serves other .NET types). We're now thus duplicating .NET functionality.

Also see this blog post and this one.

Describe the solution you'd like

Use TimeProvider and deprecate IClock, but keep it in a backward compatible manner.

Describe alternatives you've considered

We can just keep our parallel implementation, but it's better to align with the wider .NET ecosystem.

@hishamco
Copy link
Member

Thanks for someone mentioning this :) I have thought about using this since .NET 8

Use TimeProvider and deprecate IClock, but keep it in a backward compatible manner.

While the next release is major, I don't think it's an issue to break this

@Piedone
Copy link
Member Author

Piedone commented Dec 30, 2024

Just dropping IClock would be hugely breaking. Since it's simple interface, providing a shim will be of little effort, by allowing people to adapt gradually.

@sebastienros
Copy link
Member

@hishamco I think this was mentioned in the meeting too, that we can keep the IClock around for users, that just wraps the new TimeProvider implementation, but OC would not use it. And then we can make it obsolete (or not). Not sure this would be removed anytime soon.

@sebastienros sebastienros added this to the 3.x milestone Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@hishamco
Copy link
Member

hishamco commented Jan 3, 2025

Seb do you remember which meeting, I need to check the recording

@Piedone
Copy link
Member Author

Piedone commented Jan 3, 2025

It's somewhere in this section: https://youtu.be/Cmu7RLimyoQ?si=Hnxv4IMw3t67b85X&t=2073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants