absolute_unit 0.11.4

A unit system for Rust's type system to catch unit errors in your physical calculations.
Documentation
use crate::{TimeUnit, Unit};

#[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "bevy_reflect", derive(bevy_reflect::Reflect))]
pub struct Seconds;
impl Unit for Seconds {
    const UNIT_NAME: &'static str = "seconds";
    const UNIT_SHORT_NAME: &'static str = "s";
    const UNIT_SUFFIX: &'static str = "s";
}
impl TimeUnit for Seconds {
    const SECONDS_IN_UNIT: f64 = 1.;
}

#[macro_export]
macro_rules! seconds {
    ($num:expr) => {
        $crate::Time::<$crate::Seconds>::from(&$num)
    };
}