use std::time::Instant;
#[derive(Debug, Clone, Copy)]
pub struct Stopwatch {
start_instant: Instant,
}
impl Stopwatch {
pub fn start() -> Self {
Self {
start_instant: Instant::now(),
}
}
pub fn elapsed_time(&self) -> f64 {
self.start_instant.elapsed().as_secs_f64()
}
}