pub fn calculate_total(timer: &Snapshot<'_>, segment_index: usize, comparison: &str) -> TimeSpan {
    let mut total = TimeSpan::zero();

    for index in segment_index..timer.run().len() {
        if let Some(time_save) = calculate(timer, index, comparison, true) {
            total += time_save;
        }
    }

    total
}
/// Calculates how much time could be saved on the remainder of the run with the
/// given comparison. This information is based on the best segments.
/// Considering the best segments don't represent theoretically perfect segment
/// times, this information is only an approximation of how much time can
/// actually be saved. This information is always live, so the total possible
/// time save will shrink towards zero throughout the run and when time is lost
/// on a segment. The time returned by this function can never be below zero.
Calculates how much time could be saved on the remainder of the run with the
given comparison. This information is based on the best segments.
Considering the best segments don't represent theoretically perfect segment
times, this information is only an approximation of how much time can
actually be saved. This information is always live, so the total possible
time save will shrink towards zero throughout the run and when time is lost
on a segment. The time returned by this function can never be below zero.
Calculates how much time could be saved on the remainder of the run with the given comparison . This information is based on the best segments . Considering the best segments don ' t represent theoretically perfect segment times this information is only an approximation of how much time can actually be saved . This information is always live so the total possible time save will shrink towards zero throughout the run and when time is lost on a segment . The time returned by this function can never be below zero .
pub fn calculate_total(timer: &Snapshot<'_>, segment_index: usize, comparison: &str) -> TimeSpan {
    let mut total = TimeSpan::zero();
    for index in segment_index..timer.run().len() {
        if let Some(time_save) = calculate(timer, index, comparison, true) {
            total += time_save;
        }
    }
    total
}
pub fn calculate_total ( timer : & Snapshot < ' _ > , segment_index : usize , comparison : & str ) -> TimeSpan { let mut total = TimeSpan :: zero ( ) ; for index in segment_index .. timer . run ( ) . len ( ) { if let Some ( time_save ) = calculate ( timer , index , comparison , true ) { total += time_save ; } } total }
Calculates how much time could be saved on the remainder of the run with the
given comparison.
Calculates how much time could be saved on the remainder of the run with the given comparison .
timer
&Snapshot<'_>
segment_index
usize
comparison
&str
timer
&Snapshot<'_>
segment_index
usize
comparison
&str