korken89 / fugit

`fugit` provides a comprehensive library of `Duration` and `Instant` for the handling of time in embedded systems, doing all it can at compile time.
Apache License 2.0
55 stars 16 forks source link

rename `MinsDuration` to `MinutesDuration` #4

Closed andresv closed 2 years ago

andresv commented 2 years ago

We have:

    fn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>;
    fn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>;
    fn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>;
    fn minutes<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>;
    fn hours<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>;

And:

pub type MicrosDuration<T> = Duration<T, 1, 1_000_000>;
pub type MillisDuration<T> = Duration<T, 1, 1_000>;
pub type SecsDuration<T> = Duration<T, 1, 1>;
pub type MinsDuration<T> = Duration<T, 60, 1>;
pub type HoursDuration<T> = Duration<T, 3_600, 1>;

I think MinutesDuration as alias is more consistent.