* Here's the hardware-side impl I have. AN important part is calculating `ns_per_tick` based on timer properties (like auto reload and prescaler for STM) ```rust /// Get the time elapsed since the start of the timer, taking overflow wraps into account. /// /// Important: the value returned here will only be correct if the ARR and PSC are set /// only using the constructor, `set_freq`, or `set_period` methods. pub fn elapsed(&mut self) -> Instant { // let wrap_count = self.wrap_count; let wrap_count = TICK_OVERFLOW_COUNT.load(Ordering::Acquire) as u64; let count_ns = ((self.read_count() as u64 + wrap_count as u64 * self.get_max_duty() as u64) as i128 * self.ns_per_tick as i128); Instant::new(count_ns) } ```