From 2e1e548dbcc7166ea3160d6372dbf69ea866f652 Mon Sep 17 00:00:00 2001 From: ChristianVisintin Date: Mon, 30 Nov 2020 15:54:05 +0100 Subject: [PATCH] -T option is millis, not micros --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4b4fa6b..fc2cd00 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ fn main() { //Process options // FIXME: there is no way to provide password from CLI atm let mut opts = Options::new(); - opts.optopt("T", "ticks", "Set UI ticks; default 10000µs", "<µs>"); + opts.optopt("T", "ticks", "Set UI ticks; default 10ms", ""); opts.optflag("v", "version", ""); opts.optflag("h", "help", "Print this menu"); let matches = match opts.parse(&args[1..]) { @@ -92,7 +92,7 @@ fn main() { // Match ticks if let Some(val) = matches.opt_str("T") { match val.parse::() { - Ok(val) => ticks = Duration::from_micros(val as u64), + Ok(val) => ticks = Duration::from_millis(val as u64), Err(_) => { eprintln!("Ticks is not a number '{}'", val); print_usage(opts);