From f4c9e39b2647e8e2e9c971e29ef11f9b4d86f1f5 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 1 Mar 2023 00:52:09 +0100 Subject: [PATCH] Clear Screen before printing new DNS Update --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 652dc61..3283381 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(); }