From 966ce8a63e2746c134ff7da8a4346749a11c8078 Mon Sep 17 00:00:00 2001 From: Conni <31339874+ConniTheKiwi@users.noreply.github.com> Date: Tue, 3 Nov 2020 15:00:17 +0000 Subject: [PATCH 1/5] Update main.rs --- src/main.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index c730122..b19b143 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,9 +14,20 @@ // Written by: Bobbbay Bobbayan -use std::{thread, time, fs}; +use std::{thread, time, fs, env}; fn main() { + let args: Vec = env::args().collect(); + + let mut time = 10; // Set time in ms + + // If args are larger than 1 then parse them + if(args.len() > 1) { + if(args[1] == "-t") { + time = args[2].parse::().unwrap(); + } + } + // Find all logger directories on startup. As // mentioned in theory, each module should have // its own logger directory. @@ -45,7 +56,10 @@ fn main() { } } // Finally, print out the status files and wait 1ms - println!("{:?}", err_files); - thread::sleep(time::Duration::from_millis(1)); + + if(file_num >= 0) { + println!("{:?}", err_files); + } + thread::sleep(time::Duration::from_millis(time)); } } From ccacc98fbdca4e0b1864719bb9836c3d49dddcef Mon Sep 17 00:00:00 2001 From: Conni <31339874+ConniTheKiwi@users.noreply.github.com> Date: Thu, 5 Nov 2020 20:58:42 +0000 Subject: [PATCH 2/5] Added time to elapse command -t