pub struct ReferenceTimestamp { /* private fields */ }
Expand description
A timestamp which anchors the profile in absolute time.
In the profile JSON, this uses a UNIX timestamp.
All timestamps in the profile are relative to this reference timestamp.
Implementations§
source§impl ReferenceTimestamp
impl ReferenceTimestamp
sourcepub fn from_duration_since_unix_epoch(duration: Duration) -> Self
pub fn from_duration_since_unix_epoch(duration: Duration) -> Self
Create a reference timestamp from a Duration
since the UNIX epoch.
sourcepub fn from_millis_since_unix_epoch(ms_since_unix_epoch: f64) -> Self
pub fn from_millis_since_unix_epoch(ms_since_unix_epoch: f64) -> Self
Create a reference timestamp from milliseconds since the UNIX epoch.
sourcepub fn from_system_time(system_time: SystemTime) -> Self
pub fn from_system_time(system_time: SystemTime) -> Self
Create a reference timestamp from a SystemTime
.
Trait Implementations§
source§impl Clone for ReferenceTimestamp
impl Clone for ReferenceTimestamp
source§fn clone(&self) -> ReferenceTimestamp
fn clone(&self) -> ReferenceTimestamp
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 ReferenceTimestamp
impl Debug for ReferenceTimestamp
source§impl From<SystemTime> for ReferenceTimestamp
impl From<SystemTime> for ReferenceTimestamp
source§fn from(system_time: SystemTime) -> Self
fn from(system_time: SystemTime) -> Self
Converts to this type from the input type.
source§impl PartialEq<ReferenceTimestamp> for ReferenceTimestamp
impl PartialEq<ReferenceTimestamp> for ReferenceTimestamp
source§fn eq(&self, other: &ReferenceTimestamp) -> bool
fn eq(&self, other: &ReferenceTimestamp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ReferenceTimestamp> for ReferenceTimestamp
impl PartialOrd<ReferenceTimestamp> for ReferenceTimestamp
source§fn partial_cmp(&self, other: &ReferenceTimestamp) -> Option<Ordering>
fn partial_cmp(&self, other: &ReferenceTimestamp) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ReferenceTimestamp
impl Serialize for ReferenceTimestamp
impl Copy for ReferenceTimestamp
impl StructuralPartialEq for ReferenceTimestamp
Auto Trait Implementations§
impl RefUnwindSafe for ReferenceTimestamp
impl Send for ReferenceTimestamp
impl Sync for ReferenceTimestamp
impl Unpin for ReferenceTimestamp
impl UnwindSafe for ReferenceTimestamp
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