pub fn prune(&mut self, filter_time: u64) {
        self.0.retain(|k, v| {
            if let Ok(time) = v.last_time.elapsed() {
                if time < std::time::Duration::from_secs(filter_time) {
                    true
                } else {
                    info!("[{k}] non-active, removing");
                    false
                }
            } else {
                info!("[{k}] non-active(time error), removing");
                false
            }
        });
    }
/// Remove airplane after not active for a time
Remove airplane after not active for a time
Remove airplane after not active for a time
pub fn prune(&mut self, filter_time: u64) {
        self.0.retain(|k, v| {
            if let Ok(time) = v.last_time.elapsed() {
                if time < std::time::Duration::from_secs(filter_time) {
                    true
                } else {
                    info!("[{k}] non-active, removing");
                    false
                }
            } else {
                info!("[{k}] non-active(time error), removing");
                false
            }
        });
    }
pub fn prune ( & mut self , filter_time : u64 ) { self . 0 . retain ( | k , v | { if let Ok ( time ) = v . last_time . elapsed ( ) { if time < std :: time :: Duration :: from_secs ( filter_time ) { true } else { info ! ( " " ) ; false } } else { info ! ( " " ) ; false } } ) ; }
Remove airplane after not active for a time
Remove airplane after not active for a time
&mut self
filter_time
u64
&mut self
filter_time
u64