Time Debugging via Print
This commit is contained in:
parent
0159724a7c
commit
767f9652dd
1 changed files with 5 additions and 1 deletions
|
@ -142,7 +142,7 @@ impl Bot {
|
||||||
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(1));
|
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)
|
||||||
|
@ -192,6 +192,8 @@ fn run_bot() {
|
||||||
|
|
||||||
// Enter a loop (not for debugging)
|
// Enter a loop (not for debugging)
|
||||||
loop {
|
loop {
|
||||||
|
println!("Start Time: {}", this.start_time.time());
|
||||||
|
println!("Previous Time: {}", old);
|
||||||
this.idle();
|
this.idle();
|
||||||
// 3 retries in case of connection issues
|
// 3 retries in case of connection issues
|
||||||
let mut loop_breaker: u8 = 0;
|
let mut loop_breaker: u8 = 0;
|
||||||
|
@ -204,6 +206,8 @@ fn run_bot() {
|
||||||
loop_breaker += 1;
|
loop_breaker += 1;
|
||||||
};
|
};
|
||||||
this.print_info();
|
this.print_info();
|
||||||
|
println!("Start Time: {}", this.start_time.time());
|
||||||
|
println!("Previous Time: {}", old);
|
||||||
this.idle();
|
this.idle();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue