fn stress_wait_until( timeout_ticks: u64, cond: impl FnMut() -> bool, ) -> Result<bool, &'static str>