fn reset_active_alarm(&self) {
        let now = self.alarm.now();
        let mut next_alarm = u32::max_value();
        let mut next_dist = u32::max_value();
        for app in self.app.iter() {
            app.enter(|app, _| match app.alarm_data.expiration {
                Expiration::Abs(exp) => {
                    let t_dist = exp.wrapping_sub(now);
                    if next_dist > t_dist {
                        next_alarm = exp;
                        next_dist = t_dist;
                    }
                }
                Expiration::Disabled => {}
            });
        }
        if next_alarm != u32::max_value() {
            self.alarm.set_alarm(next_alarm);
        }
    }
// Determines which app timer will expire next and sets the underlying alarm
// to it.
//
// This method iterates through all grants so it should be used somewhat
// sparringly. Moreover, it should _not_ be called from within a grant,
// since any open grant will not be iterated over and the wrong timer will
// likely be chosen.
Determines which app timer will expire next and sets the underlying alarm
to it.

This method iterates through all grants so it should be used somewhat
sparringly. Moreover, it should _not_ be called from within a grant,
since any open grant will not be iterated over and the wrong timer will
likely be chosen.
Determines which app timer will expire next and sets the underlying alarm to it . This method iterates through all grants so it should be used somewhat sparringly . Moreover it should _not_ be called from within a grant since any open grant will not be iterated over and the wrong timer will likely be chosen .
fn reset_active_alarm(&self) {
        let now = self.alarm.now();
        let mut next_alarm = u32::max_value();
        let mut next_dist = u32::max_value();
        for app in self.app.iter() {
            app.enter(|app, _| match app.alarm_data.expiration {
                Expiration::Abs(exp) => {
                    let t_dist = exp.wrapping_sub(now);
                    if next_dist > t_dist {
                        next_alarm = exp;
                        next_dist = t_dist;
                    }
                }
                Expiration::Disabled => {}
            });
        }
        if next_alarm != u32::max_value() {
            self.alarm.set_alarm(next_alarm);
        }
    }
fn reset_active_alarm ( & self ) { let now = self . alarm . now ( ) ; let mut next_alarm = u32 :: max_value ( ) ; let mut next_dist = u32 :: max_value ( ) ; for app in self . app . iter ( ) { app . enter ( | app , _ | match app . alarm_data . expiration { Expiration :: Abs ( exp ) => { let t_dist = exp . wrapping_sub ( now ) ; if next_dist > t_dist { next_alarm = exp ; next_dist = t_dist ; } } Expiration :: Disabled => { } } ) ; } if next_alarm != u32 :: max_value ( ) { self . alarm . set_alarm ( next_alarm ) ; } }
Determines which app timer will expire next and sets the underlying alarm
to it.
Determines which app timer will expire next and sets the underlying alarm to it .
&self
&self