[][src]Function livesplit_core::analysis::state_helper::live_segment_time

pub fn live_segment_time(
    timer: &Timer,
    segment_index: usize,
    method: TimingMethod
) -> Option<TimeSpan>

Gets the length of the last segment that leads up to a certain split, using the live segment time if the split is not completed yet.

  • timer: The current timer.
  • segment_index: The index of the split that represents the end of the segment.
  • method: The timing method that you are using.

Returns the length of the segment leading up to segment_index, returning the live segment time if the split is not completed yet.