1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
//! #Monotonic Clocks
//!
//! This a convenience crate provides a monotonic clock for measuring
//! durations that can be anchored to a specific point in time.
//!
//! ## Example
//! ```
//! use monotonic_clock::MonotonicClock;
//! use std::thread;
//! use std::time::Duration;
//! let clock = MonotonicClock::new();
//! let start = clock.now();
//! thread::sleep(Duration::from_millis(100));
//! let end = clock.now();
//! assert!(end - start >= Duration::from_millis(100));
//! ```
#![deny(missing_docs)]
mod clock;
mod epoch;
pub use clock::MonotonicClock;
pub use epoch::Epoch;