pub fn wait_for_machine_setup(machine_count: usize) -> Result<(), ()> {
    let start = Instant::now();
    while start.elapsed() < Duration::from_secs(5) {
        thread::sleep(Duration::from_nanos(50));
        if executor::get_machine_count() >= machine_count {
            return Ok(());
        }
    }
    if log_enabled!(log::Level::Error) {
        log::error!(
            "wait_for_machine_setup failed: count={}, expecting={}",
            executor::get_machine_count(),
            machine_count
        );
    } else {
        println!(
            "wait_for_machine_setup failed: count={}, expecting={}",
            executor::get_machine_count(),
            machine_count
        );
    }
    Err(())
}
// wait for the machine count to be increased to the provided count
wait for the machine count to be increased to the provided count
wait for the machine count to be increased to the provided count
pub fn wait_for_machine_setup(machine_count: usize) -> Result<(), ()> {
    let start = Instant::now();
    while start.elapsed() < Duration::from_secs(5) {
        thread::sleep(Duration::from_nanos(50));
        if executor::get_machine_count() >= machine_count {
            return Ok(());
        }
    }
    if log_enabled!(log::Level::Error) {
        log::error!(
            "wait_for_machine_setup failed: count={}, expecting={}",
            executor::get_machine_count(),
            machine_count
        );
    } else {
        println!(
            "wait_for_machine_setup failed: count={}, expecting={}",
            executor::get_machine_count(),
            machine_count
        );
    }
    Err(())
}
pub fn wait_for_machine_setup ( machine_count : usize ) -> Result < ( ) , ( ) > { let start = Instant :: now ( ) ; while start . elapsed ( ) < Duration :: from_secs ( 5 ) { thread :: sleep ( Duration :: from_nanos ( 50 ) ) ; if executor :: get_machine_count ( ) >= machine_count { return Ok ( ( ) ) ; } } if log_enabled ! ( log Level Error ) { log :: error ! ( " " executor get_machine_count ( ) machine_count ) ; } else { println ! ( " " executor get_machine_count ( ) machine_count ) ; } Err ( ( ) ) }
wait for the machine count to be increased to the provided count
wait for the machine count to be increased to the provided count
machine_count
usize