pub struct Transform {
pub monotonic_offset: i64,
pub synthetic_offset: i64,
pub rate_adjust_ppm: i32,
pub error_bound_at_offset: u64,
pub error_bound_growth_ppm: u32,
}
Expand description
A transformation from monotonic time to synthetic time, including an error bound on this synthetic time.
Fields§
§monotonic_offset: i64
An offset on the monotonic timeline in nanoseconds.
synthetic_offset: i64
An offset on the synthetic timeline in nanoseconds.
rate_adjust_ppm: i32
An adjustment to the standard 1 monotonic tick:1 synthetic tick rate in parts per million. Positive values indicate the synthetic clock is moving faster than the monotonic clock.
error_bound_at_offset: u64
The error bound on synthetic clock at monotonic = monotonic_offset.
error_bound_growth_ppm: u32
The growth in error bound per monotonic tick in parts per million.
Implementations§
source§impl Transform
impl Transform
sourcepub fn synthetic(&self, monotonic: Time) -> Time
pub fn synthetic(&self, monotonic: Time) -> Time
Returns the synthetic time at the supplied monotonic time.
sourcepub fn error_bound(&self, monotonic: Time) -> u64
pub fn error_bound(&self, monotonic: Time) -> u64
Returns the error bound at the supplied monotonic time.
sourcepub fn difference(&self, other: &Transform, monotonic: Time) -> Duration
pub fn difference(&self, other: &Transform, monotonic: Time) -> Duration
Returns the synthetic time on this Transform
minus the synthetic time on other
,
calculated at the supplied monotonic time.
sourcepub fn jump_to(&self, monotonic: Time) -> ClockUpdate
pub fn jump_to(&self, monotonic: Time) -> ClockUpdate
Returns a ClockUpdate
that will set a Clock
onto this Transform
using data
from the supplied monotonic time.