mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Fixing nanosleep() call on POSIX, wrongly converting milliseconds.
This commit is contained in:
+2
-2
@@ -8380,8 +8380,8 @@ static void ma_sleep__posix(ma_uint32 milliseconds)
|
|||||||
#else
|
#else
|
||||||
#if _POSIX_C_SOURCE >= 199309L
|
#if _POSIX_C_SOURCE >= 199309L
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
ts.tv_sec = milliseconds / 1000000;
|
ts.tv_sec = milliseconds / 1000;
|
||||||
ts.tv_nsec = milliseconds % 1000000 * 1000000;
|
ts.tv_nsec = milliseconds % 1000 * 1000000;
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|||||||
Reference in New Issue
Block a user