1993-08-04 23:30:29 +04:00
|
|
|
/* sleep.c
|
|
|
|
Sleep for a number of seconds. */
|
|
|
|
|
|
|
|
#include "uucp.h"
|
|
|
|
|
|
|
|
#include "sysdep.h"
|
|
|
|
#include "system.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
usysdep_sleep (c)
|
|
|
|
int c;
|
|
|
|
{
|
1994-10-25 01:17:41 +03:00
|
|
|
#if HAVE_NAPMS || HAVE_NAP || HAVE_USLEEP || HAVE_SELECT || HAVE_POLL
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* In this case, usysdep_pause is accurate. */
|
|
|
|
for (i = 2 * c; i > 0; i--)
|
|
|
|
usysdep_pause ();
|
|
|
|
#else
|
|
|
|
/* On some system sleep (1) may not sleep at all. Avoid this sort
|
|
|
|
of problem by always doing at least sleep (2). */
|
|
|
|
if (c < 2)
|
|
|
|
c = 2;
|
1993-08-04 23:30:29 +04:00
|
|
|
(void) sleep (c);
|
1994-10-25 01:17:41 +03:00
|
|
|
#endif
|
1993-08-04 23:30:29 +04:00
|
|
|
}
|