pub enum DisTimeStamp {
Absolute {
units_past_the_hour: u32,
nanoseconds_past_the_hour: u32,
},
Relative {
units_past_the_hour: u32,
nanoseconds_past_the_hour: u32,
},
}Expand description
A timestamp type that models the timestamp mechanism as described in the
DIS standard (section 6.2.88 Timestamp). This timestamp interprets an u32 value
as an Absolute or a Relative timestamp based on the Least Significant Bit.
The remaining (upper) bits represent the units of time passed since the
beginning of the current hour in the selected time reference.
The DisTimeStamp stores both the units past the hour, and a conversion to
nanoseconds past the hour.
Variants§
Implementations§
Source§impl DisTimeStamp
impl DisTimeStamp
pub fn new_absolute_from_secs(seconds_past_the_hour: u32) -> Self
pub fn new_relative_from_secs(seconds_past_the_hour: u32) -> Self
pub fn new_absolute_from_units(units_past_the_hour: u32) -> Self
pub fn new_relative_from_units(units_past_the_hour: u32) -> Self
Trait Implementations§
Source§impl Debug for DisTimeStamp
impl Debug for DisTimeStamp
Source§impl From<DisTimeStamp> for TimeStamp
impl From<DisTimeStamp> for TimeStamp
Source§fn from(value: DisTimeStamp) -> Self
fn from(value: DisTimeStamp) -> Self
Converts to this type from the input type.
Source§impl From<DisTimeStamp> for u32
impl From<DisTimeStamp> for u32
Source§fn from(value: DisTimeStamp) -> Self
fn from(value: DisTimeStamp) -> Self
Converts to this type from the input type.
Source§impl From<TimeStamp> for DisTimeStamp
impl From<TimeStamp> for DisTimeStamp
Auto Trait Implementations§
impl Freeze for DisTimeStamp
impl RefUnwindSafe for DisTimeStamp
impl Send for DisTimeStamp
impl Sync for DisTimeStamp
impl Unpin for DisTimeStamp
impl UnwindSafe for DisTimeStamp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more