#[repr(C)]pub struct LVTime { /* private fields */ }
Expand description
Mirrors the internal LabVIEW timestamp structure so it can be passed back and forward.
Implementations§
Source§impl LVTime
impl LVTime
Sourcepub fn sub_seconds(&self) -> f64
pub fn sub_seconds(&self) -> f64
Extract the sub-second component as a floating point number.
Sourcepub const fn seconds(&self) -> i64
pub const fn seconds(&self) -> i64
Extract the seconds component which is referenced to the LabVIEW epoch.
Sourcepub fn from_lv_epoch(seconds: f64) -> Self
pub fn from_lv_epoch(seconds: f64) -> Self
From a double precision number which is the seconds since the 1904 epoch used by LabVIEW
Sourcepub fn to_lv_epoch(&self) -> f64
pub fn to_lv_epoch(&self) -> f64
Into a double precision number which is the seconds since the 1904 epoch used by LabVIEW.
Sourcepub fn to_unix_epoch(&self) -> f64
pub fn to_unix_epoch(&self) -> f64
To a double precision number which is the seconds since unix epoch.
Sourcepub fn from_unix_epoch(seconds: f64) -> Self
pub fn from_unix_epoch(seconds: f64) -> Self
To a double precision number which is the seconds since unix epoch.
Sourcepub const fn from_parts(seconds: i64, fractions: u64) -> Self
pub const fn from_parts(seconds: i64, fractions: u64) -> Self
Build from the full seconds and fractional second parts.
Sourcepub const fn to_le_bytes(&self) -> [u8; 16]
pub const fn to_le_bytes(&self) -> [u8; 16]
To little endian bytes.
Sourcepub const fn to_be_bytes(&self) -> [u8; 16]
pub const fn to_be_bytes(&self) -> [u8; 16]
To big endian bytes.
Sourcepub const fn from_le_bytes(bytes: [u8; 16]) -> Self
pub const fn from_le_bytes(bytes: [u8; 16]) -> Self
From little endian bytes.
Sourcepub const fn from_be_bytes(bytes: [u8; 16]) -> Self
pub const fn from_be_bytes(bytes: [u8; 16]) -> Self
From big endian bytes.
Trait Implementations§
Source§impl Ord for LVTime
impl Ord for LVTime
Source§impl PartialOrd for LVTime
impl PartialOrd for LVTime
impl Copy for LVTime
impl Eq for LVTime
impl StructuralPartialEq for LVTime
Auto Trait Implementations§
impl Freeze for LVTime
impl RefUnwindSafe for LVTime
impl Send for LVTime
impl Sync for LVTime
impl Unpin for LVTime
impl UnwindSafe for LVTime
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