Commit e278342e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Parse sub-second intervals on command-line.

parent 0289c039
...@@ -161,16 +161,24 @@ main(int argc, char **argv) ...@@ -161,16 +161,24 @@ main(int argc, char **argv)
} }
} else if(strcmp(*arg, "-h") == 0) { } else if(strcmp(*arg, "-h") == 0) {
SHIFTE(); SHIFTE();
wireless_hello_interval = atoi(*arg) * 1000; wireless_hello_interval = parse_msec(*arg);
if(wireless_hello_interval <= 0)
goto syntax;
} else if(strcmp(*arg, "-H") == 0) { } else if(strcmp(*arg, "-H") == 0) {
SHIFTE(); SHIFTE();
wired_hello_interval = atoi(*arg) * 1000; wired_hello_interval = parse_msec(*arg);
if(wired_hello_interval <= 0)
goto syntax;
} else if(strcmp(*arg, "-i") == 0) { } else if(strcmp(*arg, "-i") == 0) {
SHIFTE(); SHIFTE();
idle_hello_interval = atoi(*arg) * 1000; idle_hello_interval = parse_msec(*arg);
if(idle_hello_interval <= 0)
goto syntax;
} else if(strcmp(*arg, "-u") == 0) { } else if(strcmp(*arg, "-u") == 0) {
SHIFTE(); SHIFTE();
update_interval = atoi(*arg) * 1000; update_interval = parse_msec(*arg);
if(update_interval <= 0)
goto syntax;
} else if(strcmp(*arg, "-k") == 0) { } else if(strcmp(*arg, "-k") == 0) {
SHIFTE(); SHIFTE();
kernel_metric = atoi(*arg); kernel_metric = atoi(*arg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment