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

pub fn previous_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.

  • 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 None if the split is not completed yet.