… | |
… | |
608 | #endif |
608 | #endif |
609 | |
609 | |
610 | } |
610 | } |
611 | } |
611 | } |
612 | #endif |
612 | #endif |
|
|
613 | |
|
|
614 | // should nto be use din interactive programs, for obvious reasons |
|
|
615 | void rxvt_usleep (int usecs) |
|
|
616 | { |
|
|
617 | #if HAVE_NANOSLEEP |
|
|
618 | struct timespec ts; |
|
|
619 | |
|
|
620 | ts.tv_sec = 0; |
|
|
621 | ts.tv_nsec = usecs * 1000; |
|
|
622 | nanosleep (&ts, NULL); |
|
|
623 | #else |
|
|
624 | /* use select for timing */ |
|
|
625 | struct timeval tv; |
|
|
626 | |
|
|
627 | tv.tv_sec = 0; |
|
|
628 | tv.tv_usec = usecs; |
|
|
629 | select (0, NULL, NULL, NULL, &tv); |
|
|
630 | #endif |
|
|
631 | } |
|
|
632 | |
613 | /*----------------------- end-of-file (C source) -----------------------*/ |
633 | /*----------------------- end-of-file (C source) -----------------------*/ |
|
|
634 | |