in heatmap/src/lib.rs [26:36]
fn age_out() {
let heatmap =
Heatmap::new(0, 4, 20, Duration::from_secs(1), Duration::from_millis(1)).unwrap();
assert_eq!(heatmap.percentile(0.0).map(|v| v.high()), Err(Error::Empty));
heatmap.increment(Instant::now(), 1, 1);
assert_eq!(heatmap.percentile(0.0).map(|v| v.high()), Ok(1));
std::thread::sleep(std::time::Duration::from_millis(100));
assert_eq!(heatmap.percentile(0.0).map(|v| v.high()), Ok(1));
std::thread::sleep(std::time::Duration::from_millis(2000));
assert_eq!(heatmap.percentile(0.0).map(|v| v.high()), Err(Error::Empty));
}