// Fns used to interact with an MLME running in test mode.
// TODO(fxbug.dev/45464): Remove when tests are all in Rust.
Fns used to interact with an MLME running in test mode.
TODO(fxbug.dev/45464): Remove when tests are all in Rust.
Fns used to interact with an MLME running in test mode . TODO ( fxbug . dev / 45464 ) : Remove when tests are all in Rust .
pub fn advance_fake_time(&mut self, nanos: i64) {
        match &mut self.internal {
            MlmeHandleInternal::Real { .. } => panic!("Called advance_fake_time on a real MLME"),
            MlmeHandleInternal::Fake { executor, future } => {
                let time = executor.now();
                executor.set_fake_time(time + fasync::Duration::from_nanos(nanos));
                executor.wake_expired_timers();
                let _ = executor.run_until_stalled(&mut future.as_mut());
            }
        }
    }
pub fn advance_fake_time ( & mut self , nanos : i64 ) { match & mut self . internal { MlmeHandleInternal :: Real { .. } => panic ! ( " " ) , MlmeHandleInternal :: Fake { executor , future } => { let time = executor . now ( ) ; executor . set_fake_time ( time + fasync :: Duration :: from_nanos ( nanos ) ) ; executor . wake_expired_timers ( ) ; let _ = executor . run_until_stalled ( & mut future . as_mut ( ) ) ; } } }
Fns used to interact with an MLME running in test mode.
Fns used to interact with an MLME running in test mode .
&mut self
nanos
i64