1 /* libc/posix/usleep.c - usleep function */
3 /* Written 2002 by Jeff Johnston */
11 int usleep(useconds_t useconds
)
15 ts
.tv_sec
= (long int)useconds
/ 1000000;
16 ts
.tv_nsec
= ((long int)useconds
% 1000000) * 1000;
17 if (!nanosleep(&ts
,&ts
)) return 0;