Function rtic_time::half_period_counter::calculate_now

source ·
pub fn calculate_now<P, T, F1, F2, O>(half_periods: F1, timer_value: F2) -> O
where T: TimerValue, O: From<P> + From<T> + TimerOps, F1: FnOnce() -> P, F2: FnOnce() -> T,
Expand description

Calculates the current time from the half period counter and the timer value.

§Arguments

  • half_periods - A closure/function that when called produces the period counter value. If read from an atomic, can use Ordering::Relaxed.
  • timer_value - A closure/function that when called produces the current timer value.