pub fn record_part(&mut self, part_name: impl ToString) {
        let i = self.part_names.len();
        self.part_names.push(part_name.to_string());
        self.remove_old();

        let now = Instant::now();
        let d = now - self.last_time;
        self.last_time = now;

        if i == 0 {
            self.times.push_back((now, Vec::with_capacity(self.times.back().map(|x| x.1.len()).unwrap_or_default())));
        }
        self.times.back_mut().unwrap().1.push(d);


        if i < self.total_micros.len() {
            self.total_micros[i] += d.as_micros();
        } else {
            self.total_micros.push(d.as_micros());
        }
    }
/// Record the previous part under the given `part_name`
Record the previous part under the given `part_name`
Record the previous part under the given ` part_name `
pub fn record_part(&mut self, part_name: impl ToString) {
        let i = self.part_names.len();
        self.part_names.push(part_name.to_string());
        self.remove_old();
        let now = Instant::now();
        let d = now - self.last_time;
        self.last_time = now;
        if i == 0 {
            self.times.push_back((now, Vec::with_capacity(self.times.back().map(|x| x.1.len()).unwrap_or_default())));
        }
        self.times.back_mut().unwrap().1.push(d);
        if i < self.total_micros.len() {
            self.total_micros[i] += d.as_micros();
        } else {
            self.total_micros.push(d.as_micros());
        }
    }
pub fn record_part ( & mut self , part_name : impl ToString ) { let i = self . part_names . len ( ) ; self . part_names . push ( part_name . to_string ( ) ) ; self . remove_old ( ) ; let now = Instant :: now ( ) ; let d = now - self . last_time ; self . last_time = now ; if i == 0 { self . times . push_back ( ( now , Vec :: with_capacity ( self . times . back ( ) . map ( | x | x . 1 . len ( ) ) . unwrap_or_default ( ) ) ) ) ; } self . times . back_mut ( ) . unwrap ( ) . 1 . push ( d ) ; if i < self . total_micros . len ( ) { self . total_micros [ i ] += d . as_micros ( ) ; } else { self . total_micros . push ( d . as_micros ( ) ) ; } }
Record the previous part under the given `part_name`
Record the previous part under the given ` part_name `
&mut self
part_name
impl ToString
&mut self
part_name
impl ToString