Add time option

This commit is contained in:
Erik 2023-05-31 17:33:54 +02:00
parent eb35683748
commit 0b5ab4872c

View File

@ -70,7 +70,7 @@ async fn main() {
if !args.csv {
println!("Sending ping {i}");
}
sleep(Duration::from_millis(1)).await;
sleep(Duration::from_millis(args.time)).await;
}
if !args.csv {
println!("Done sending pings");
@ -90,6 +90,10 @@ struct Args {
#[arg(short, long)]
count: u32,
/// Time between pings
#[arg(short, long)]
time: u64,
/// CSV mode
#[arg(long)]
csv: bool,