Monotony exposes a narrow MonotonicClock trait over std::time::Instant.
Inject the trait into code that measures durations, so production code can use
StdMonotonicClock while tests provide deterministic time.
use std::time::Duration;
use monotony::{MonotonicClock, StdMonotonicClock};
fn measure_elapsed(clock: &dyn MonotonicClock) -> Duration {
let started_at = clock.now();
clock.now().duration_since(started_at)
}
let elapsed = measure_elapsed(&StdMonotonicClock);
assert!(elapsed >= Duration::ZERO);