Reduce Sleep wait interval to 1s
This commit is contained in:
parent
1ee425352d
commit
0159724a7c
1 changed files with 3 additions and 2 deletions
|
@ -138,10 +138,11 @@ impl Bot {
|
||||||
if Utc::now().time() - self.start_time.time() > sleep_duration {
|
if Utc::now().time() - self.start_time.time() > sleep_duration {
|
||||||
sleep_duration = chrono::Duration::seconds(60);
|
sleep_duration = chrono::Duration::seconds(60);
|
||||||
}
|
}
|
||||||
|
|
||||||
while Utc::now().time() - self.start_time.time() < sleep_duration {
|
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=") {
|
match reqwest::blocking::get("https://status.neshweb.net/api/push/7s1CjPPzrV?status=up&msg=OK&ping=") {
|
||||||
Ok(_) => {},
|
Ok(_) => {},
|
||||||
Err(err) => println!("{}", err)
|
Err(err) => println!("{}", err)
|
||||||
|
|
Loading…
Reference in a new issue