FluenTech / embedded-time

Time(ing) library (Instant/Duration/Clock/Timer/Period/Frequency) for bare-metal embedded systems
Apache License 2.0
87 stars 17 forks source link

Implement mul for generic rate #94

Open tdittr opened 3 years ago

tdittr commented 3 years ago

Hi,

I am currently implementing some PLL logic and stumbled over generic rate not implementing Mul.

I am not sure if this was intentional or if my implementation is missing some details. I'm happy about feedback :)

I was also thinking about implementing Div, but I am not sure how that should affect the fraction.

Thanks for the nice library, tdittr

PTaylor-us commented 3 years ago

Thanks for this! It was intentional, but I'm starting to realize that these features do need to exist.

tdittr commented 3 years ago

Hi thanks for the response. Maybe this PR would need a bit more thought to be useful for the whole crate.