Clear Screen before printing new DNS Update

This commit is contained in:
Neshura 2023-03-01 00:52:09 +01:00
parent d9e8bca649
commit f4c9e39b26
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A

View file

@ -275,13 +275,12 @@ fn main() {
let mut now = Utc::now() - Duration::seconds(59);
let mut current = now;
println!("Initial Time is {} {}", now.format("%H:%M:%S"), now.timezone());
loop {
now = Utc::now();
if now >= current + Duration::seconds(60) {
current = now;
print!("\x1B[2J\x1B[1;1H");
println!("Starting DNS Update at {} {}", now.format("%H:%M:%S"), now.timezone());
update_dns();
}