mirror of
https://github.com/diegocr/libnix.git
synced 2026-09-11 19:25:43 +00:00
17 lines
286 B
C
17 lines
286 B
C
#include "timerbase.h"
|
|
#include <sys/time.h>
|
|
|
|
extern int nanosleep( struct timespec *x, struct timespec *y );
|
|
|
|
unsigned int sleep(unsigned int seconds)
|
|
{
|
|
struct timespec rqt, rmt;
|
|
|
|
rqt.ts_sec = seconds;
|
|
rqt.ts_nsec = 0;
|
|
|
|
nanosleep(&rqt, &rmt);
|
|
|
|
return (unsigned int)rmt.ts_sec;
|
|
}
|