From b6680d7391808f48813c12b8c618e132c6672928 Mon Sep 17 00:00:00 2001 From: Richard Bainesly Date: Mon, 17 Jun 2024 15:25:20 -0400 Subject: [PATCH] Lower sleep times in rollinglog --- hyprctl/main.cpp | 2 +- src/debug/HyprCtl.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index f5de041b..d70d5874 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -132,7 +132,7 @@ int rollingRead(const int socket) { buffer.fill('\0'); } - usleep(100000); + usleep(1000); } close(socket); return 0; diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 70b886f2..ed42872b 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -1753,7 +1753,6 @@ void runWritingDebugLogThread(const int conn) { std::thread([conn]() { while (Debug::RollingLogFollow::Get().IsRunning()) { if (Debug::RollingLogFollow::Get().isEmpty(conn)) { - std::this_thread::sleep_for(1000ms); continue; } @@ -1762,7 +1761,7 @@ void runWritingDebugLogThread(const int conn) { // We cannot write, when connection is closed. So thread will successfully exit by itself break; - std::this_thread::sleep_for(100ms); + std::this_thread::sleep_for(1ms); } close(conn); Debug::RollingLogFollow::Get().StopFor(conn);