Struct TimeSample
pub struct TimeSample {
pub utc: Option<i64>,
pub monotonic: Option<i64>,
pub standard_deviation: Option<i64>,
pub reference: Option<Instant<BootTimeline>>,
/* private fields */
}
Expand description
A correspondence pair that describes a UTC and the reference clock readings at the measurement instant.
Fields§
§utc: Option<i64>
The UTC time sample. The value of this instant is a value on the UTC timeline. However, the field is not type safe, as there is no UTC specific type on the zx level.
monotonic: Option<i64>
The monotonic time at which the sample was most valid. Must always be
provided.
DEPRECATED. Use reference
below instead.
standard_deviation: Option<i64>
The standard deviation representing the error distribution of the UTC measurement. Must always be provided.
reference: Option<Instant<BootTimeline>>
The timestamp on the reference timeline at which the sample was most valid. Must always be provided. The reference timeline is tracking the rate of change of proper time 1. So, for example, Fuchsia’s boot timeline will generate the appropriate reference instant.
Trait Implementations§
§impl Clone for TimeSample
impl Clone for TimeSample
§fn clone(&self) -> TimeSample
fn clone(&self) -> TimeSample
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for TimeSample
impl Debug for TimeSample
§impl<D> Decode<TimeSample, D> for TimeSamplewhere
D: ResourceDialect,
impl<D> Decode<TimeSample, D> for TimeSamplewhere
D: ResourceDialect,
§fn new_empty() -> TimeSample
fn new_empty() -> TimeSample
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for TimeSample
impl Default for TimeSample
§fn default() -> TimeSample
fn default() -> TimeSample
§impl<D> Encode<TimeSample, D> for &TimeSamplewhere
D: ResourceDialect,
impl<D> Encode<TimeSample, D> for &TimeSamplewhere
D: ResourceDialect,
§impl PartialEq for TimeSample
impl PartialEq for TimeSample
§impl TypeMarker for TimeSample
impl TypeMarker for TimeSample
§type Owned = TimeSample
type Owned = TimeSample
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for TimeSample
impl ValueTypeMarker for TimeSample
§type Borrowed<'a> = &'a TimeSample
type Borrowed<'a> = &'a TimeSample
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<TimeSample as TypeMarker>::Owned,
) -> <TimeSample as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<TimeSample as TypeMarker>::Owned, ) -> <TimeSample as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.