Add the throttle flag

This commit is contained in:
Maxim Svistunov 2024-02-05 13:23:46 +01:00
parent 9106e23d61
commit 03e357fd40
2 changed files with 11 additions and 0 deletions

View file

@ -18,6 +18,8 @@ pub struct Configuration {
port: u16,
#[arg(short, long, help = "Path to the data file")]
file: PathBuf,
#[arg(short, long, help = "Delay between rows in milliseconds")]
throttle: Option<u64>,
}
impl Configuration {
@ -30,4 +32,9 @@ impl Configuration {
pub fn get_file_path(&self) -> &PathBuf {
&self.file
}
#[inline]
pub fn get_throttle(&self) -> Option<u64> {
self.throttle
}
}