pub struct Time {
pub sec: i32,
pub nanosec: u32,
}Expand description
Time_t — Wall-Clock-Timestamp seit Unix-Epoch.
Fields§
§sec: i32Seconds seit 1970-01-01 UTC.
nanosec: u32Nanoseconds-Anteil [0, 999_999_999].
Implementations§
Source§impl Time
impl Time
Sourcepub const INVALID: Self
pub const INVALID: Self
Reserviertes Sentinel “ungueltige Zeit” (Spec-Konvention: sec=-1, nanosec=0xFFFF_FFFF).
Sourcepub const fn is_zero(&self) -> bool
pub const fn is_zero(&self) -> bool
true wenn der Wert dem Self::ZERO-Sentinel entspricht.
Sourcepub const fn is_invalid(&self) -> bool
pub const fn is_invalid(&self) -> bool
true wenn der Wert dem Self::INVALID-Sentinel entspricht.
Sourcepub const fn is_infinite(&self) -> bool
pub const fn is_infinite(&self) -> bool
true wenn der Wert dem Self::INFINITE-Sentinel entspricht.
Sourcepub const fn seconds(&self) -> i32
pub const fn seconds(&self) -> i32
Spec §7.5.6.1 — seconds-Accessor (DDS-PSM-Cxx Time::seconds()).
Sourcepub const fn nanoseconds(&self) -> u32
pub const fn nanoseconds(&self) -> u32
Spec §7.5.6.1 — nanoseconds-Accessor.
Sourcepub fn add_duration(self, d: Duration) -> Self
pub fn add_duration(self, d: Duration) -> Self
Spec §7.5.6.2 — Time + Duration (Sekunden-Increment).
Sourcepub const fn from_millis(ms: i64) -> Self
pub const fn from_millis(ms: i64) -> Self
Spec §7.5.6.3 — Time aus Millisekunden-Integer.
Trait Implementations§
Source§impl Ord for Time
impl Ord for Time
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Time
impl PartialOrd for Time
impl Copy for Time
impl Eq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnsafeUnpin for Time
impl UnwindSafe for Time
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