pub fn ticks_to_duration( ticks_hz: Hertz, ticks: u16, ) -> Result<Duration, EspError>
A utility to convert ticks into duration, depending on the clock ticks.