pub struct TimeStamp {
pub raw_timestamp: u32,
}Expand description
Custom type to model timestamps, just wrapping a u32 value. By default,
the PduHeader uses this type. Users can decide to convert the raw value
to a DisTimeStamp, which models the Absolute and Relative interpretations of the value as defined by the standard.
The standard defines the value to be a number of DIS time units since the top of the hour. There are 2^31 - 1 time units in an hour. This results in each time unit representing exactly 3600/(2^31) seconds (approximately 1.67638063 μs).
This raw timestamp could also be interpreted as a Unix timestamp, or something else like a monotonically increasing timestamp. This is left up to the client applications of the protocol by this library.
Fields§
§raw_timestamp: u32Implementations§
Trait Implementations§
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<TimeStamp> for DisTimeStamp
impl From<TimeStamp> for DisTimeStamp
impl Copy for TimeStamp
impl StructuralPartialEq for TimeStamp
Auto Trait Implementations§
impl Freeze for TimeStamp
impl RefUnwindSafe for TimeStamp
impl Send for TimeStamp
impl Sync for TimeStamp
impl Unpin for TimeStamp
impl UnwindSafe for TimeStamp
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