pub struct Comparison { /* private fields */ }Expand description
Two clocks compared now and then, with the rate between them, so that a time on one is put on the other as the two stood when it was taken, not as at the last comparison: clocks some ppm apart drift hundreds of ns between comparisons. A line fitted through the comparisons kept gives both, so no one comparison’s error carries over whole.
Implementations§
Source§impl Comparison
impl Comparison
Sourcepub fn update(&mut self, at: i128, offset: i128)
pub fn update(&mut self, at: i128, offset: i128)
The clock compared read at, and offset ahead of the other.
Sourcepub fn offset_at(&self, at: i128) -> i128
pub fn offset_at(&self, at: i128) -> i128
How far ahead of the other the clock compared was at at, a time
on it.
Sourcepub fn rate(&self) -> Option<f64>
pub fn rate(&self) -> Option<f64>
How much faster the clock compared runs than the other, as a fraction, once compared twice.
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§impl Debug for Comparison
impl Debug for Comparison
Auto Trait Implementations§
impl Forget for Comparison
impl Freeze for Comparison
impl Move for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnsafeUnpin for Comparison
impl UnwindSafe for Comparison
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