diff --git a/src/main.rs b/src/main.rs index 6e3610d..0a72f13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -//#![windows_subsystem = "windows"] +#![windows_subsystem = "windows"] use chrono::prelude::*; use chrono::{DateTime, Local, TimeZone}; @@ -76,8 +76,6 @@ impl Config { } } fn is_in_time(&self, value: TimeHM) -> bool { - dbg!(value); - dbg!(self.start <= value && value <= self.end); self.start <= value && value <= self.end } fn is_active(&self) -> bool { @@ -89,15 +87,11 @@ impl Config { } fn is_target_alive(&self) -> bool { let name = self.target_name(); - dbg!(&name); let sp = System::new_all(); let procs = sp.processes_by_exact_name(&name); - let count = procs.count(); - dbg!(count); - count > 0 + procs.count() > 0 } fn relaunch_target(&self) { - dbg!(&self.command); let mut cmd = Command::new(&self.command); cmd.current_dir(&self.workdir); if let Some(args) = &self.args { @@ -109,7 +103,6 @@ impl Config { (!self.command.is_empty()) && self.delay > 0 } fn main_loop(self) { - dbg!(self.is_valid()); if !self.is_valid() { return; }