Struct tic::Clocksource
[−]
[src]
pub struct Clocksource { /* fields omitted */ }
Methods
impl Clocksource
[src]
fn new() -> Clocksource
create a new clocksource
fn configured(reference: Clock, source: Clock) -> Clocksource
allows manual configuration of the Clocksource
and performs initial calibration
fn frequency(&self) -> f64
get the approximate frequency of the source clock in Hz
fn counter(&self) -> u64
get the raw counter reading of the source clock
fn reference(&self) -> u64
get nanoseconds from the reference clock
fn time(&self) -> u64
get the nanoseconds from the source clock
fn calibrate(&mut self)
calibrate the source frequency against the reference
fn recalibrate(&mut self)
recalculate the frequency, without changing the reference time
fn phase_error(&self) -> f64
estimate of the phase error between the source and reference clocksource
fn convert(&self, src_t1: u64) -> f64
converts a raw reading to approximation of reference in nanoseconds
Trait Implementations
impl Default for Clocksource
[src]
fn default() -> Clocksource
Returns the "default value" for a type. Read more
impl Clone for Clocksource
[src]
fn clone(&self) -> Clocksource
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more