pub fn gc(&mut self, expired_duration: Duration) -> usize {
        let orig_length = self.content.len();
        let t = GlobalTime::now();
        self.content.retain(|_, (ttime, _)| t.differential(*ttime) > expired_duration);
        orig_length - self.content.len()
    }
/// Garbage collect all the necessary transactions
Garbage collect all the necessary transactions
Garbage collect all the necessary transactions
pub fn gc(&mut self, expired_duration: Duration) -> usize {
        let orig_length = self.content.len();
        let t = GlobalTime::now();
        self.content.retain(|_, (ttime, _)| t.differential(*ttime) > expired_duration);
        orig_length - self.content.len()
    }
pub fn gc ( & mut self , expired_duration : Duration ) -> usize { let orig_length = self . content . len ( ) ; let t = GlobalTime :: now ( ) ; self . content . retain ( | _ , ( ttime , _ ) | t . differential ( * ttime ) > expired_duration ) ; orig_length - self . content . len ( ) }
Garbage collect all the necessary transactions
Garbage collect all the necessary transactions
&mut self
expired_duration
Duration