mirror of https://github.com/mpv-player/mpv
build: remove nanosleep() check
Also guaranteed by POSIX.
This commit is contained in:
parent
0601e48ef4
commit
7bc48f7843
|
@ -25,7 +25,6 @@
|
|||
#include "config.h"
|
||||
#include "timer.h"
|
||||
|
||||
#if HAVE_NANOSLEEP
|
||||
void mp_sleep_us(int64_t us)
|
||||
{
|
||||
if (us < 0)
|
||||
|
@ -35,14 +34,6 @@ void mp_sleep_us(int64_t us)
|
|||
ts.tv_nsec = (us % 1000000) * 1000;
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
#else
|
||||
void mp_sleep_us(int64_t us)
|
||||
{
|
||||
if (us < 0)
|
||||
return;
|
||||
usleep(us);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(CLOCK_MONOTONIC)
|
||||
uint64_t mp_raw_time_us(void)
|
||||
|
|
4
wscript
4
wscript
|
@ -223,10 +223,6 @@ iconv support use --disable-iconv.",
|
|||
'desc': 'w32/dos paths',
|
||||
'deps': 'os-win32 || os-cygwin',
|
||||
'func': check_true
|
||||
}, {
|
||||
'name': 'nanosleep',
|
||||
'desc': 'nanosleep',
|
||||
'func': check_statement('time.h', 'nanosleep(0,0)')
|
||||
}, {
|
||||
'name': 'posix-spawn-native',
|
||||
'desc': 'spawnp()/kill() POSIX support',
|
||||
|
|
Loading…
Reference in New Issue