… | |
… | |
363 | |
363 | |
364 | #ifndef EV_HEAP_CACHE_AT |
364 | #ifndef EV_HEAP_CACHE_AT |
365 | # define EV_HEAP_CACHE_AT EV_FEATURE_DATA |
365 | # define EV_HEAP_CACHE_AT EV_FEATURE_DATA |
366 | #endif |
366 | #endif |
367 | |
367 | |
368 | #ifdef ANDROID |
368 | #ifdef __ANDROID__ |
369 | /* supposedly, android doesn't typedef fd_mask */ |
369 | /* supposedly, android doesn't typedef fd_mask */ |
370 | # undef EV_USE_SELECT |
370 | # undef EV_USE_SELECT |
371 | # define EV_USE_SELECT 0 |
371 | # define EV_USE_SELECT 0 |
372 | /* supposedly, we need to include syscall.h, not sys/syscall.h, so just disable */ |
372 | /* supposedly, we need to include syscall.h, not sys/syscall.h, so just disable */ |
373 | # undef EV_USE_CLOCK_SYSCALL |
373 | # undef EV_USE_CLOCK_SYSCALL |
… | |
… | |
1906 | struct timespec ts; |
1906 | struct timespec ts; |
1907 | |
1907 | |
1908 | EV_TS_SET (ts, delay); |
1908 | EV_TS_SET (ts, delay); |
1909 | nanosleep (&ts, 0); |
1909 | nanosleep (&ts, 0); |
1910 | #elif defined _WIN32 |
1910 | #elif defined _WIN32 |
|
|
1911 | /* maybe this should round up, as ms is very low resolution */ |
|
|
1912 | /* compared to select (µs) or nanosleep (ns) */ |
1911 | Sleep ((unsigned long)(delay * 1e3)); |
1913 | Sleep ((unsigned long)(delay * 1e3)); |
1912 | #else |
1914 | #else |
1913 | struct timeval tv; |
1915 | struct timeval tv; |
1914 | |
1916 | |
1915 | /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ |
1917 | /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ |