monotonic_clock/
lib.rs

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