… | |
… | |
565 | struct timeval tv; |
565 | struct timeval tv; |
566 | |
566 | |
567 | tv.tv_sec = (time_t)delay; |
567 | tv.tv_sec = (time_t)delay; |
568 | tv.tv_usec = (long)((delay - (ev_tstamp)(tv.tv_sec)) * 1e6); |
568 | tv.tv_usec = (long)((delay - (ev_tstamp)(tv.tv_sec)) * 1e6); |
569 | |
569 | |
|
|
570 | /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ |
|
|
571 | /* somehting nto guaranteed by newer posix versions, but guaranteed */ |
|
|
572 | /* by older ones */ |
570 | select (0, 0, 0, 0, &tv); |
573 | select (0, 0, 0, 0, &tv); |
571 | #endif |
574 | #endif |
572 | } |
575 | } |
573 | } |
576 | } |
574 | |
577 | |
… | |
… | |
1508 | { |
1511 | { |
1509 | postfork = 1; /* must be in line with ev_default_fork */ |
1512 | postfork = 1; /* must be in line with ev_default_fork */ |
1510 | } |
1513 | } |
1511 | |
1514 | |
1512 | #if EV_VERIFY |
1515 | #if EV_VERIFY |
1513 | void noinline |
1516 | static void noinline |
1514 | verify_watcher (EV_P_ W w) |
1517 | verify_watcher (EV_P_ W w) |
1515 | { |
1518 | { |
1516 | assert (("watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); |
1519 | assert (("watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); |
1517 | |
1520 | |
1518 | if (w->pending) |
1521 | if (w->pending) |