pub fn undo_all_pauses(&mut self) {
        match self.current_phase() {
            Paused => self.resume(),
            Ended => {
                let pause_time = Some(self.get_pause_time().unwrap_or_default());

                let split_time = self
                    .run
                    .segments_mut()
                    .iter_mut()
                    .last()
                    .unwrap()
                    .split_time_mut();

                *split_time += Time::new()
                    .with_real_time(pause_time)
                    .with_game_time(pause_time);
            }
            _ => {}
        }

        self.adjusted_start_time = self.start_time_with_offset;

        // FIXME: OnUndoAllPauses
    }
/// Removes all the pause times from the current time. If the current
/// attempt is paused, it also resumes that attempt. Additionally, if the
/// attempt is finished, the final split time is adjusted to not include the
/// pause times as well.
///
/// # Warning
///
/// This behavior is not entirely optimal, as generally only the final split
/// time is modified, while all other split times are left unmodified, which
/// may not be what actually happened during the run.
Removes all the pause times from the current time. If the current
attempt is paused, it also resumes that attempt. Additionally, if the
attempt is finished, the final split time is adjusted to not include the
pause times as well.
Removes all the pause times from the current time . If the current attempt is paused it also resumes that attempt . Additionally if the attempt is finished the final split time is adjusted to not include the pause times as well .
pub fn undo_all_pauses(&mut self) {
        match self.current_phase() {
            Paused => self.resume(),
            Ended => {
                let pause_time = Some(self.get_pause_time().unwrap_or_default());
                let split_time = self
                    .run
                    .segments_mut()
                    .iter_mut()
                    .last()
                    .unwrap()
                    .split_time_mut();
                *split_time += Time::new()
                    .with_real_time(pause_time)
                    .with_game_time(pause_time);
            }
            _ => {}
        }
        self.adjusted_start_time = self.start_time_with_offset;
        // FIXME: OnUndoAllPauses
    }
pub fn undo_all_pauses ( & mut self ) { match self . current_phase ( ) { Paused => self . resume ( ) , Ended => { let pause_time = Some ( self . get_pause_time ( ) . unwrap_or_default ( ) ) ; let split_time = self . run . segments_mut ( ) . iter_mut ( ) . last ( ) . unwrap ( ) . split_time_mut ( ) ; * split_time += Time :: new ( ) . with_real_time ( pause_time ) . with_game_time ( pause_time ) ; } _ => { } } self . adjusted_start_time = self . start_time_with_offset ; // FIXME: OnUndoAllPauses }
Removes all the pause times from the current time.
Removes all the pause times from the current time .
&mut self
&mut self
warning
This behavior is not entirely optimal, as generally only the final split
time is modified, while all other split times are left unmodified, which
may not be what actually happened during the run.
This behavior is not entirely optimal as generally only the final split time is modified while all other split times are left unmodified which may not be what actually happened during the run .