feat: add refresh_rate option for clock

This commit is contained in:
2025-07-04 03:30:29 +02:00
parent 981aa4efc7
commit ba836e5cd4
16 changed files with 133 additions and 95 deletions

View File

@@ -59,8 +59,9 @@ bool read_press_nb(u_char* length, char* out, struct timeval* tv) {
fd_set fds;
FD_ZERO(&fds);
FD_SET(STDIN_FILENO, &fds);
errno = 0;
int ret = select(STDIN_FILENO + 1, &fds, NULL, NULL, tv);
if ((ret < 0 && errno == EINTR) || ret == 0) return false;
if (errno || ret <= 0) return false;
read_press(length, out);
return true;