snooze-rs
Experimental library for sleeping periodically in Rust code.
Usage:
Cargo.toml:
[]
= "0.0.3"
Crate root:
extern crate snooze;
extern crate time;
Basic usage:
use ;
use Duration;
The function do_things()
will be called approximately every 42 ms, depending on
system timer accuracy and assuming do_things() takes less than 42 ms.