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 keeping(span: Duration) -> Self
pub fn keeping(span: Duration) -> Self
Comparisons kept over span rather than 2 s, for a clock read so
coarsely that 2 s of them leave its line moving with each new one.
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.
Sourcepub fn last_at(&self) -> Option<i128>
pub fn last_at(&self) -> Option<i128>
When the clock compared read for the last comparison kept, on it.