Struct adi_clock::Timer
[−]
[src]
pub struct Timer { /* fields omitted */ }
Timer represents a High Precision Event Timer (HPET) or equivalent device. It is used for precise sleeping.
Methods
impl Timer
[src]
fn create(secs: f32) -> Timer
Create a new repeating timer with an interval of secs seconds.
fn wait(&mut self) -> f32
Wait until timer self goes off. Returns the number of seconds since self was initialized (or since Timer::new() was called).
fn sleep(secs: f32) -> f32
Sleep (wait) for secs seconds. Returns the number of seconds passed while sleeping.