From 09ddf5919e5aaa02cb9ef272f0a6e7389022f61a Mon Sep 17 00:00:00 2001 From: Chloe Fontenot Date: Wed, 13 Nov 2024 22:55:43 -0600 Subject: [PATCH] move sleep down --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index bc6ae52..52687cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,7 +96,6 @@ fn main() { break; } } - thread::sleep(Duration::from_millis(polling_rate)); // Autoscroll: Autoscroll automatically toggles ths scrolling direction when the scrolling reaches a nonspace. if args.autoscroll { @@ -116,13 +115,14 @@ fn main() { } } } - write!(lock, "i: {}, com buf status: {}, upd: {}ms, scrll: {}, {}\r\n", {i +=1; i}, send_status, polling_rate, either!(scroll_left => "L"; "R"), input).unwrap(); + write!(lock, "i: {}, com buf status: {}, upd: {}ms, scrll: {}, {}\n", {i +=1; i}, send_status, polling_rate, either!(scroll_left => "L"; "R"), input).unwrap(); // Scroll text if scroll_left { input = shift_left(input); } else { input = shift_right(input); } + thread::sleep(Duration::from_millis(polling_rate)); } }