Sleep USECONDS microseconds, or until a previously set timer goes off. */
| 46 | |
| 47 | /* Sleep USECONDS microseconds, or until a previously set timer goes off. */ |
| 48 | int |
| 49 | usleep(unsigned long useconds) |
| 50 | { |
| 51 | #ifdef apollo |
| 52 | /* The usleep function does not work under the SYS5.3 environment. |
| 53 | Use the Domain/OS time_$wait call instead. */ |
| 54 | time_$wait(time_$relative, DomainTime100mS, &DomainStatus); |
| 55 | #elif defined(HAVE_SSLEEP) /* Win32 */ |
| 56 | Sleep(useconds / 1000); |
| 57 | #else |
| 58 | struct timeval delay; |
| 59 | |
| 60 | delay.tv_sec = 0; |
| 61 | delay.tv_usec = useconds; |
| 62 | select(0, 0, 0, 0, &delay); |
| 63 | #endif |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | #endif /* !HAVE_USLEEP */ |
no outgoing calls
no test coverage detected