newlib-cygwin/newlib/libc/sys/sysvi386/sleep.c

13 lines
185 B
C
Raw Normal View History

2000-02-18 03:39:52 +08:00
#include <sys/types.h>
#include <sys/signal.h>
unsigned
sleep(unsigned secs) {
extern time_t time (time_t *);
time_t t = time(0);
_alarm(secs);
_pause();
return (time(0) - t);
}