From 0159724a7c7975e2d79b5b1502c077f2879b3d58 Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 31 Jul 2023 23:01:52 +0200 Subject: [PATCH] Reduce Sleep wait interval to 1s --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 69d0a9c..0258ebd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -138,10 +138,11 @@ impl Bot { if Utc::now().time() - self.start_time.time() > sleep_duration { sleep_duration = chrono::Duration::seconds(60); } - + while Utc::now().time() - self.start_time.time() < sleep_duration { - sleep(time::Duration::from_secs(10)); + sleep(time::Duration::from_secs(1)); } + match reqwest::blocking::get("https://status.neshweb.net/api/push/7s1CjPPzrV?status=up&msg=OK&ping=") { Ok(_) => {}, Err(err) => println!("{}", err)