From dddab25a19280a13f08debbd00f99e84e54ef708 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 15 Nov 2024 09:24:40 -0500 Subject: Use nanosleep() instead of usleep() The old usleep() was declared obsolete by POSIX.1-2001, and removed in POSIX.1-2008. --- src/jalv_console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/jalv_console.c b/src/jalv_console.c index 2ca69b3..4c10e54 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -24,7 +24,7 @@ #ifdef _WIN32 # include #else -# include +# include #endif #include @@ -299,7 +299,8 @@ jalv_run_custom_ui(Jalv* jalv) # ifdef _WIN32 Sleep(33); # else - usleep(33333); + const struct timespec delay = {0, 33333000}; + nanosleep(&delay, NULL); # endif } -- cgit v1.2.1