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 Hours;
impl Unit for Hours {
const UNIT_NAME: &'static str = "hours";
const UNIT_SHORT_NAME: &'static str = "h";
const UNIT_SUFFIX: &'static str = "h";
}
impl TimeUnit for Hours {
const SECONDS_IN_UNIT: f64 = 3_600.;
}
#[macro_export]
macro_rules! hours {
($num:expr) => {
$crate::Time::<$crate::Hours>::from(&$num)
};
}