1234567891011121314151617181920212223242526272829303132 |
- #include <sys/timex.h>
- int ntp_gettime(struct ntptimeval *ntv)
- {
- struct timex tntx;
- int result;
- tntx.modes = 0;
- result = adjtimex(&tntx);
- ntv->time = tntx.time;
- ntv->maxerror = tntx.maxerror;
- ntv->esterror = tntx.esterror;
- return result;
- }
|