pub enum Timestamp {
TimestampDeltaUs(i64),
TimestampAbsoluteUs(i64),
}
Expand description
Deprecated. Use the |timestamp| and |timestamp_clock_id| fields in TracePacket instead.
Timestamp in microseconds (usually CLOCK_MONOTONIC).
Variants§
TimestampDeltaUs(i64)
Delta timestamp value since the last TrackEvent or ThreadDescriptor. To calculate the absolute timestamp value, sum up all delta values of the preceding TrackEvents since the last ThreadDescriptor and add the sum to the |reference_timestamp| in ThreadDescriptor. This value should always be positive.
TimestampAbsoluteUs(i64)
Absolute value (e.g. a manually specified timestamp in the macro). This is a one-off value that does not affect delta timestamp computation in subsequent TrackEvents.
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub fn merge<B>(
field: &mut Option<Timestamp>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext,
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<Timestamp>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext,
) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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