1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 13:56:45 +02:00

Replace deprecated usleep function with nanosleep

usleep was declared obsolete in POSIX.1-2001
This commit is contained in:
jfreegman
2020-11-03 12:17:48 -05:00
parent f64300d1d6
commit 42763905d7
7 changed files with 32 additions and 13 deletions

View File

@ -227,7 +227,7 @@ void graceful_clear(void)
return;
}
usleep(1000);
sleep_thread(1000L);
}
control_unlock();
@ -305,7 +305,7 @@ void *do_playing(void *_p)
has_looping = false;
control_unlock();
usleep(10000);
sleep_thread(10000L);
}
pthread_exit(NULL);
@ -361,7 +361,7 @@ void *do_playing(void *_p)
}
control_unlock();
usleep(10000);
sleep_thread(10000L);
}
pthread_exit(NULL);