diff --git a/src/duration.rs b/src/duration.rs index 6e6757d..f7bff63 100644 --- a/src/duration.rs +++ b/src/duration.rs @@ -16,6 +16,10 @@ impl DurationRange { pub fn is_flat(&self) -> bool { self.0 == self.1 } + + pub fn start(&self) -> &Duration { + &self.0 + } } impl FromStr for DurationRange { diff --git a/src/main.rs b/src/main.rs index 34abe2b..d6625a4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,7 +83,10 @@ struct Args { fn main() -> Result<()> { let args = Args::parse(); - let wait: Option = args.wait.map(|v| v.parse()).transpose()?; + let wait = match args.wait.map(|v| v.parse::()).transpose()? { + Some(v) if v.start() == &Duration::from_millis(0) && v.is_flat() => None, + v => v, + }; if !args.silent && args.parallel.get() > 1 && wait.as_ref().is_some_and(|v| v.is_flat()) { println!(