pub type TimeSplitNorm = TimeSplit<u64, u8, u8, u8, u8, u8, u16, u16, u16>;
Available on crate feature
time
only.Expand description
A time split from years to nanoseconds, normalized (192b size, 152b payload).
Aliased Type§
struct TimeSplitNorm {
pub y: u64,
pub mo: u8,
pub d: u8,
pub h: u8,
pub m: u8,
pub s: u8,
pub ms: u16,
pub us: u16,
pub ns: u16,
}
Fields§
§y: u64
Years.
mo: u8
Months.
d: u8
Days.
h: u8
Hours.
m: u8
Minutes.
s: u8
Seconds.
ms: u16
Milliseconds.
us: u16
Microseconds.
ns: u16
Nanoseconds.
Implementations§
Source§impl TimeSplitNorm
impl TimeSplitNorm
Sourcepub const fn from_duration(duration: Duration) -> Self
pub const fn from_duration(duration: Duration) -> Self
Converts a Duration
into a full TimeSplit
.
It assumes non-leap years and 30-day months for simplicity in calendar calculations.