Commit 66fad49e authored by Marco Lizza's avatar Marco Lizza

Fixing `nanosleep()` call on POSIX, wrongly converting milliseconds.

parent 16207dd0
......@@ -8380,8 +8380,8 @@ static void ma_sleep__posix(ma_uint32 milliseconds)
#else
#if _POSIX_C_SOURCE >= 199309L
struct timespec ts;
ts.tv_sec = milliseconds / 1000000;
ts.tv_nsec = milliseconds % 1000000 * 1000000;
ts.tv_sec = milliseconds / 1000;
ts.tv_nsec = milliseconds % 1000 * 1000000;
nanosleep(&ts, NULL);
#else
struct timeval tv;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment