fix: replace usleep with nanosleep and fix const correctness
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user