Time::to_ratio

This commit is contained in:
Quaternions 2024-09-13 13:59:28 -07:00
parent 4bd5815184
commit 734be35937

View File

@ -41,6 +41,10 @@ impl Time{
pub const fn nanos(self)->i64{
self.0
}
#[inline]
pub const fn to_ratio(self)->Ratio<Planar64,Planar64>{
Ratio::new(Planar64::raw(self.0),Planar64::raw(1_000_000_000))
}
}
impl From<Planar64> for Time{
#[inline]