source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e"
+[[package]]
+name = "humantime"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"
+
[[package]]
name = "hyper"
version = "0.10.16"
dependencies = [
"anyhow",
"fehler",
+ "humantime",
"libc",
"nix 0.19.1",
"structopt",
pub use std::os::linux::fs::MetadataExt; // todo why linux for st_mode??
pub use std::path;
pub use std::process::{Command, Stdio};
+pub use std::thread::sleep;
+pub use std::time;
+pub const MS : time::Duration = time::Duration::from_millis(1);
pub type AE = anyhow::Error;
#[derive(Debug,Clone)]
#[structopt(long="--tmp-dir", default_value="tmp")]
tmp_dir: String,
+
+ #[structopt(long="--pause", default_value="0ms")]
+ pause: humantime::Duration,
}
#[derive(Debug)]
}
eprintln!("pid = {}", nix::unistd::getpid());
- std::thread::sleep_ms(3500);
+ sleep(opts.pause.into());
let cln = cleanup_notify::Handle::new()?;
let (tmp, abstmp) = prepare_tmpdir(&opts, ¤t_exe)?;
.wait().context("wait")?;
println!("s = {:?}", &s);
- std::thread::sleep_ms(500);
+ std::thread::sleep(500 * MS);
}
}