use std::{
path::Path,
thread,
time::{Duration, Instant},
};
pub fn wait_for_path(path: &Path) {
let deadline = Instant::now() + Duration::from_secs(10);
while !path.exists() {
assert!(
Instant::now() < deadline,
"timed out waiting for {}",
path.display()
);
thread::sleep(Duration::from_millis(10));
}
}