[][src]Function livesplit_core::analysis::possible_time_save::calculate_total

pub fn calculate_total(
    timer: &Timer,
    segment_index: usize,
    comparison: &str
) -> TimeSpan

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.