Back to index

glibc  2.9
Classes | Defines | Functions
timex.h File Reference
#include <features.h>
#include <sys/time.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  ntptimeval
struct  timex


#define ADJ_OFFSET   0x0001 /* time offset */
#define ADJ_FREQUENCY   0x0002 /* frequency offset */
#define ADJ_MAXERROR   0x0004 /* maximum time error */
#define ADJ_ESTERROR   0x0008 /* estimated time error */
#define ADJ_STATUS   0x0010 /* clock status */
#define ADJ_TIMECONST   0x0020 /* pll time constant */
#define ADJ_TICK   0x4000 /* tick value */
#define ADJ_OFFSET_SINGLESHOT   0x8001 /* old-fashioned adjtime */
#define ADJ_OFFSET_SS_READ   0xa001 /* read-only adjtime */
#define MOD_CLKA   ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */
#define STA_PLL   0x0001 /* enable PLL updates (rw) */
#define STA_PPSFREQ   0x0002 /* enable PPS freq discipline (rw) */
#define STA_PPSTIME   0x0004 /* enable PPS time discipline (rw) */
#define STA_FLL   0x0008 /* select frequency-lock mode (rw) */
#define STA_INS   0x0010 /* insert leap (rw) */
#define STA_DEL   0x0020 /* delete leap (rw) */
#define STA_UNSYNC   0x0040 /* clock unsynchronized (rw) */
#define STA_FREQHOLD   0x0080 /* hold frequency (rw) */
#define STA_PPSSIGNAL   0x0100 /* PPS signal present (ro) */
#define STA_PPSJITTER   0x0200 /* PPS signal jitter exceeded (ro) */
#define STA_PPSWANDER   0x0400 /* PPS signal wander exceeded (ro) */
#define STA_PPSERROR   0x0800 /* PPS signal calibration error (ro) */
#define STA_CLOCKERR   0x1000 /* clock hardware fault (ro) */
#define STA_RONLY
#define TIME_OK   0 /* clock synchronized, no leap second */
#define TIME_INS   1 /* insert leap second */
#define TIME_DEL   2 /* delete leap second */
#define TIME_OOP   3 /* leap second in progress */
#define TIME_WAIT   4 /* leap second has occurred */
#define TIME_ERROR   5 /* clock not synchronized */
#define TIME_BAD   TIME_ERROR /* bw compat */
#define MAXTC   6


__BEGIN_DECLS int __adjtimex (struct timex *__ntx) __THROW
int adjtimex (struct timex *__ntx) __THROW
int ntp_gettime (struct ntptimeval *__ntv) __THROW
int ntp_adjtime (struct timex *__tntx) __THROW

Class Documentation

struct ntptimeval

Definition at line 27 of file timex.h.

Class Members
long int esterror
long int maxerror
struct timex

Definition at line 34 of file timex.h.

Class Members
int __pad0__:32
int __pad10__:32
int __pad11__:32
int __pad1__:32
int __pad2__:32
int __pad3__:32
int __pad4__:32
int __pad5__:32
int __pad6__:32
int __pad7__:32
int __pad8__:32
int __pad9__:32
long int calcnt
long int constant
long int errcnt
long int esterror
long int freq
long int jitcnt
long int jitter
long int maxerror
unsigned int modes
long int offset
long int ppsfreq
long int precision
int shift
long int stabil
int status
long int stbcnt
long int tick
long int tolerance

Define Documentation

#define ADJ_ESTERROR   0x0008 /* estimated time error */

Definition at line 67 of file timex.h.

#define ADJ_FREQUENCY   0x0002 /* frequency offset */

Definition at line 65 of file timex.h.

#define ADJ_MAXERROR   0x0004 /* maximum time error */

Definition at line 66 of file timex.h.

#define ADJ_OFFSET   0x0001 /* time offset */

Definition at line 64 of file timex.h.

#define ADJ_OFFSET_SINGLESHOT   0x8001 /* old-fashioned adjtime */

Definition at line 71 of file timex.h.

#define ADJ_OFFSET_SS_READ   0xa001 /* read-only adjtime */

Definition at line 72 of file timex.h.

#define ADJ_STATUS   0x0010 /* clock status */

Definition at line 68 of file timex.h.

#define ADJ_TICK   0x4000 /* tick value */

Definition at line 70 of file timex.h.

#define ADJ_TIMECONST   0x0020 /* pll time constant */

Definition at line 69 of file timex.h.

#define MAXTC   6

Definition at line 116 of file timex.h.

#define MOD_CLKA   ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */

Definition at line 82 of file timex.h.


Definition at line 81 of file timex.h.


Definition at line 78 of file timex.h.

Definition at line 76 of file timex.h.


Definition at line 77 of file timex.h.


Definition at line 75 of file timex.h.


Definition at line 79 of file timex.h.

Definition at line 80 of file timex.h.

#define STA_CLOCKERR   0x1000 /* clock hardware fault (ro) */

Definition at line 101 of file timex.h.

#define STA_DEL   0x0020 /* delete leap (rw) */

Definition at line 92 of file timex.h.

#define STA_FLL   0x0008 /* select frequency-lock mode (rw) */

Definition at line 89 of file timex.h.

#define STA_FREQHOLD   0x0080 /* hold frequency (rw) */

Definition at line 94 of file timex.h.

#define STA_INS   0x0010 /* insert leap (rw) */

Definition at line 91 of file timex.h.

#define STA_PLL   0x0001 /* enable PLL updates (rw) */

Definition at line 86 of file timex.h.

#define STA_PPSERROR   0x0800 /* PPS signal calibration error (ro) */

Definition at line 99 of file timex.h.

#define STA_PPSFREQ   0x0002 /* enable PPS freq discipline (rw) */

Definition at line 87 of file timex.h.

#define STA_PPSJITTER   0x0200 /* PPS signal jitter exceeded (ro) */

Definition at line 97 of file timex.h.

#define STA_PPSSIGNAL   0x0100 /* PPS signal present (ro) */

Definition at line 96 of file timex.h.

#define STA_PPSTIME   0x0004 /* enable PPS time discipline (rw) */

Definition at line 88 of file timex.h.

#define STA_PPSWANDER   0x0400 /* PPS signal wander exceeded (ro) */

Definition at line 98 of file timex.h.

#define STA_RONLY
    STA_PPSERROR | STA_CLOCKERR) /* read-only bits */

Definition at line 103 of file timex.h.

#define STA_UNSYNC   0x0040 /* clock unsynchronized (rw) */

Definition at line 93 of file timex.h.

#define TIME_BAD   TIME_ERROR /* bw compat */

Definition at line 113 of file timex.h.

#define TIME_DEL   2 /* delete leap second */

Definition at line 109 of file timex.h.

#define TIME_ERROR   5 /* clock not synchronized */

Definition at line 112 of file timex.h.

#define TIME_INS   1 /* insert leap second */

Definition at line 108 of file timex.h.

#define TIME_OK   0 /* clock synchronized, no leap second */

Definition at line 107 of file timex.h.

#define TIME_OOP   3 /* leap second in progress */

Definition at line 110 of file timex.h.

#define TIME_WAIT   4 /* leap second has occurred */

Definition at line 111 of file timex.h.

Function Documentation

__BEGIN_DECLS int __adjtimex ( struct timex __ntx)
int adjtimex ( struct timex __ntx)
int ntp_adjtime ( struct timex __tntx)
int ntp_gettime ( struct ntptimeval __ntv)

Definition at line 30 of file ntp_gettime.c.

  struct timex tntx;
  int result;

  tntx.modes = 0;
  result = INTUSE(__adjtimex) (&tntx);
  ntv->time = tntx.time;
  ntv->maxerror = tntx.maxerror;
  ntv->esterror = tntx.esterror;
  return result;

Here is the call graph for this function: