fix: replace usleep with nanosleep and fix const correctness

Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-09 12:11:57 +00:00
parent 1db9735e1b
commit 7e9224cdc7
2 changed files with 5 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
int main(int argc, char *argv[]) {
(void)argc;
@@ -41,7 +42,7 @@ int main(int argc, char *argv[]) {
while (1) {
looper_process_commands(client);
usleep(50000); /* check commands every 50 ms */
{ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; nanosleep(&ts, NULL); } /* check commands every 50 ms */
}
jack_client_close(client);