home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / LIBC / LIBC-4.6 / LIBC-4 / libc-linux / sysdeps / linux / __ntpgttm.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-04  |  352 b   |  20 lines

  1. #include <syscall.h>
  2. #include <sys/timex.h>
  3. #include <linux/timex.h>
  4.  
  5. inline static
  6. _syscall1(int, adjtimex, struct timex *, ntx);
  7.  
  8. int
  9. __ntp_gettime (struct ntptimeval * ntv)
  10. {
  11.   struct timex tntx;
  12.   int result;
  13.  
  14.   result = adjtimex(&tntx);
  15.   ntv->time = tntx.time;
  16.   ntv->maxerror = tntx.maxerror;
  17.   ntv->esterror = tntx.esterror;
  18.   return result;
  19. }
  20.