3 * usleep.c - suspend process for the specified time
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
10 #include <sys/param.h>
13 #include <sys/socket.h>
15 /****** net.lib/usleep *********************************************
18 usleep - suspend process execution for the specified time
21 void usleep(unsigned int microseconds);
24 Process execution is suspended for number of microseconds
25 specified in 'microseconds'. The sleep will be aborted if any
26 of the break signals specified for the process is received
27 (only CTRL-C by default).
33 'microseconds' - number of microseconds to sleep.
36 Does not return a value.
39 The sleep is implemented as a single select() call with all other
40 than time out argument as NULL.
43 bsdsocket.library/select()
45 *****************************************************************************
49 void usleep(unsigned int usecs
)
54 while (usecs
>= 1000000) {
59 select(0, 0, 0, 0, &tv
);