diff --git a/src/integer.rs b/src/integer.rs index d435753..191ede0 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -24,6 +24,11 @@ impl Time{ self.0 } } +impl From for Time{ + fn from(value:Planar64)->Self{ + Time((((value.0 as i128)*1_000_000_000)>>32) as i64) + } +} impl std::fmt::Display for Time{ fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ write!(f,"{}s+{}ns",self.0/Self::ONE_SECOND.0,self.0%Self::ONE_SECOND.0) @@ -50,6 +55,20 @@ impl std::ops::Sub