Skip to content

Commit

Permalink
Add adjustable wait time between loop iterations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiicall committed Dec 20, 2023
1 parent fcb1373 commit cfac04a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion jellyfin-rpc-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ struct Args {
help = "Path to image urls file for imgur"
)]
image_urls: Option<String>,
#[arg(
short = 't',
long = "wait-time",
help = "Time to wait between loops in seconds",
default_value_t = 3
)]
wait_time: usize,
#[arg(
short = 's',
long = "suppress-warnings",
Expand Down Expand Up @@ -328,6 +335,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
);
}

tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
tokio::time::sleep(tokio::time::Duration::from_secs(args.wait_time as u64)).await;
}
}

0 comments on commit cfac04a

Please sign in to comment.