Skip to content

Commit

Permalink
Lower sleep times in rollinglog
Browse files Browse the repository at this point in the history
  • Loading branch information
phonetic112 committed Jun 17, 2024
1 parent d1340bd commit b6680d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hyprctl/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int rollingRead(const int socket) {
buffer.fill('\0');
}

usleep(100000);
usleep(1000);
}
close(socket);
return 0;
Expand Down
3 changes: 1 addition & 2 deletions src/debug/HyprCtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
Expand Down

0 comments on commit b6680d7

Please sign in to comment.