pub fn split(&mut self) {
        let current_time = self.current_time();
        if self.phase == Running
            && current_time
                .real_time
                .map_or(false, |t| t >= TimeSpan::zero())
        {
            self.current_split_mut()
                .unwrap()
                .set_split_time(current_time);
            *self.current_split_index.as_mut().unwrap() += 1;
            if Some(self.run.len()) == self.current_split_index {
                self.phase = Ended;
                self.attempt_ended = Some(AtomicDateTime::now());
            }
            self.run.mark_as_modified();

            // FIXME: OnSplit
        }
    }
/// If an attempt is in progress, stores the current time as the time of the
/// current split. The attempt ends if the last split time is stored.
If an attempt is in progress, stores the current time as the time of the
current split. The attempt ends if the last split time is stored.
If an attempt is in progress stores the current time as the time of the current split . The attempt ends if the last split time is stored .
pub fn split(&mut self) {
        let current_time = self.current_time();
        if self.phase == Running
            && current_time
                .real_time
                .map_or(false, |t| t >= TimeSpan::zero())
        {
            self.current_split_mut()
                .unwrap()
                .set_split_time(current_time);
            *self.current_split_index.as_mut().unwrap() += 1;
            if Some(self.run.len()) == self.current_split_index {
                self.phase = Ended;
                self.attempt_ended = Some(AtomicDateTime::now());
            }
            self.run.mark_as_modified();
            // FIXME: OnSplit
        }
    }
pub fn split ( & mut self ) { let current_time = self . current_time ( ) ; if self . phase == Running && current_time . real_time . map_or ( false , | t | t >= TimeSpan :: zero ( ) ) { self . current_split_mut ( ) . unwrap ( ) . set_split_time ( current_time ) ; * self . current_split_index . as_mut ( ) . unwrap ( ) += 1 ; if Some ( self . run . len ( ) ) == self . current_split_index { self . phase = Ended ; self . attempt_ended = Some ( AtomicDateTime :: now ( ) ) ; } self . run . mark_as_modified ( ) ; // FIXME: OnSplit } }
If an attempt is in progress, stores the current time as the time of the
current split.
If an attempt is in progress stores the current time as the time of the current split .
&mut self
&mut self