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

Upgrade core::time::Duration conversions #60

Open
PTaylor-us opened this issue Jul 30, 2020 · 1 comment
Open

Upgrade core::time::Duration conversions #60

PTaylor-us opened this issue Jul 30, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@PTaylor-us
Copy link
Member

Many of these can be switched from TryFrom to From.

@PTaylor-us PTaylor-us added the enhancement New feature or request label Jul 30, 2020
@twitchyliquid64
Copy link

+1. We are in the process of updating atsamd-rs HAL to use embedded-time (atsamd-rs/atsamd#333), but running into issues as converting to a Hertz (as a lot of methods consume an Into<Hertz>) only works for the u64 version, or using TryFrom.

On our side, we never expect anything in the Ghz, so this ends up being unwieldy.

@PTaylor-us, would you accept a PR to either:

  • Implement From for the Hertz<u32> variants, with panic/unsoundness if greater than 4.1GHz
  • Implement the From as above but using a feature flag thats off by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants