pub struct TimeStampMs {
pub seconds: i64,
pub milliseconds: u16,
}
Expand description
A UNIX timestamp with millisecond precision.
Fields§
§seconds: i64
Seconds since the UNIX epoch.
milliseconds: u16
Milliseconds component (0-999).
Implementations§
Source§impl TimeStampMs
impl TimeStampMs
Sourcepub fn new(seconds: i64, milliseconds: u16) -> Self
pub fn new(seconds: i64, milliseconds: u16) -> Self
Create a new TimeStampMs from seconds and milliseconds.
Sourcepub fn from_timestamp(ts: TimeStamp) -> Self
pub fn from_timestamp(ts: TimeStamp) -> Self
Convert from a TimeStamp (seconds only).
Sourcepub fn total_milliseconds(&self) -> i64
pub fn total_milliseconds(&self) -> i64
Get the total milliseconds since the UNIX epoch.
Trait Implementations§
Source§impl Clone for TimeStampMs
impl Clone for TimeStampMs
Source§fn clone(&self) -> TimeStampMs
fn clone(&self) -> TimeStampMs
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TimeStampMs
impl Debug for TimeStampMs
Source§impl Hash for TimeStampMs
impl Hash for TimeStampMs
Source§impl PartialEq for TimeStampMs
impl PartialEq for TimeStampMs
impl Copy for TimeStampMs
impl Eq for TimeStampMs
impl StructuralPartialEq for TimeStampMs
Auto Trait Implementations§
impl Freeze for TimeStampMs
impl RefUnwindSafe for TimeStampMs
impl Send for TimeStampMs
impl Sync for TimeStampMs
impl Unpin for TimeStampMs
impl UnwindSafe for TimeStampMs
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