Add time option
This commit is contained in:
parent
eb35683748
commit
0b5ab4872c
@ -70,7 +70,7 @@ async fn main() {
|
|||||||
if !args.csv {
|
if !args.csv {
|
||||||
println!("Sending ping {i}");
|
println!("Sending ping {i}");
|
||||||
}
|
}
|
||||||
sleep(Duration::from_millis(1)).await;
|
sleep(Duration::from_millis(args.time)).await;
|
||||||
}
|
}
|
||||||
if !args.csv {
|
if !args.csv {
|
||||||
println!("Done sending pings");
|
println!("Done sending pings");
|
||||||
@ -90,6 +90,10 @@ struct Args {
|
|||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
count: u32,
|
count: u32,
|
||||||
|
|
||||||
|
/// Time between pings
|
||||||
|
#[arg(short, long)]
|
||||||
|
time: u64,
|
||||||
|
|
||||||
/// CSV mode
|
/// CSV mode
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
csv: bool,
|
csv: bool,
|
||||||
|
Loading…
Reference in New Issue
Block a user