pub fn max_runtime(&self) -> Duration {
        let duration_ms = self.actions.iter()
            // Only Operations with actions.
            .filter(|Reverse(op)| op.action.is_some())
            .map(|Reverse(op)| match op.action.unwrap() {
                Action::Idle(idle_duration) => op.time + (idle_duration.as_millis() as u64),
                _ => op.time,
            })
            .last()
            .unwrap_or(0);
        let tail_ms = self.tail_duration
            .unwrap_or(Duration::from_millis(0))
            .as_millis();

        Duration::from_millis(duration_ms + tail_ms as u64)
    }
/// Return the maximum length of time the test can run.
///
/// TODO: make this dependent on actions' timing, criteria timing, and another tail duration(?).
Return the maximum length of time the test can run.
TODO: make this dependent on actions' timing, criteria timing, and another tail duration(?).
Return the maximum length of time the test can run . TODO : make this dependent on actions ' timing criteria timing and another tail duration ( ? ) .
pub fn max_runtime(&self) -> Duration {
        let duration_ms = self.actions.iter()
            // Only Operations with actions.
            .filter(|Reverse(op)| op.action.is_some())
            .map(|Reverse(op)| match op.action.unwrap() {
                Action::Idle(idle_duration) => op.time + (idle_duration.as_millis() as u64),
                _ => op.time,
            })
            .last()
            .unwrap_or(0);
        let tail_ms = self.tail_duration
            .unwrap_or(Duration::from_millis(0))
            .as_millis();
        Duration::from_millis(duration_ms + tail_ms as u64)
    }
pub fn max_runtime ( & self ) -> Duration { let duration_ms = self . actions . iter ( ) // Only Operations with actions. . filter ( | Reverse ( op ) | op . action . is_some ( ) ) . map ( | Reverse ( op ) | match op . action . unwrap ( ) { Action :: Idle ( idle_duration ) => op . time + ( idle_duration . as_millis ( ) as u64 ) , _ => op . time , } ) . last ( ) . unwrap_or ( 0 ) ; let tail_ms = self . tail_duration . unwrap_or ( Duration :: from_millis ( 0 ) ) . as_millis ( ) ; Duration :: from_millis ( duration_ms + tail_ms as u64 ) }
Return the maximum length of time the test can run.
Return the maximum length of time the test can run .
&self
&self