| OLD | NEW |
| 1 #ifndef _SYS_TIMEX_H | 1 #ifndef _SYS_TIMEX_H |
| 2 #define _SYS_TIMEX_H | 2 #define _SYS_TIMEX_H |
| 3 | 3 |
| 4 #ifdef __cplusplus | 4 #ifdef __cplusplus |
| 5 extern "C" { | 5 extern "C" { |
| 6 #endif | 6 #endif |
| 7 | 7 |
| 8 #define __NEED_clockid_t | 8 #define __NEED_clockid_t |
| 9 | 9 |
| 10 #include <bits/alltypes.h> | 10 #include <bits/alltypes.h> |
| 11 | 11 |
| 12 #include <sys/time.h> | 12 #include <sys/time.h> |
| 13 | 13 |
| 14 struct ntptimeval { | 14 struct ntptimeval { |
| 15 » struct timeval time; | 15 struct timeval time; |
| 16 » long maxerror, esterror; | 16 long maxerror, esterror; |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 struct timex { | 19 struct timex { |
| 20 » unsigned modes; | 20 unsigned modes; |
| 21 » long offset, freq, maxerror, esterror; | 21 long offset, freq, maxerror, esterror; |
| 22 » int status; | 22 int status; |
| 23 » long constant, precision, tolerance; | 23 long constant, precision, tolerance; |
| 24 » struct timeval time; | 24 struct timeval time; |
| 25 » long tick, ppsfreq, jitter; | 25 long tick, ppsfreq, jitter; |
| 26 » int shift; | 26 int shift; |
| 27 » long stabil, jitcnt, calcnt, errcnt, stbcnt; | 27 long stabil, jitcnt, calcnt, errcnt, stbcnt; |
| 28 » int tai; | 28 int tai; |
| 29 » int __padding[11]; | 29 int __padding[11]; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 #define ADJ_OFFSET» » 0x0001 | 32 #define ADJ_OFFSET 0x0001 |
| 33 #define ADJ_FREQUENCY» » 0x0002 | 33 #define ADJ_FREQUENCY 0x0002 |
| 34 #define ADJ_MAXERROR» » 0x0004 | 34 #define ADJ_MAXERROR 0x0004 |
| 35 #define ADJ_ESTERROR» » 0x0008 | 35 #define ADJ_ESTERROR 0x0008 |
| 36 #define ADJ_STATUS» » 0x0010 | 36 #define ADJ_STATUS 0x0010 |
| 37 #define ADJ_TIMECONST» » 0x0020 | 37 #define ADJ_TIMECONST 0x0020 |
| 38 #define ADJ_TAI»» » 0x0080 | 38 #define ADJ_TAI 0x0080 |
| 39 #define ADJ_SETOFFSET» » 0x0100 | 39 #define ADJ_SETOFFSET 0x0100 |
| 40 #define ADJ_MICRO» » 0x1000 | 40 #define ADJ_MICRO 0x1000 |
| 41 #define ADJ_NANO» » 0x2000 | 41 #define ADJ_NANO 0x2000 |
| 42 #define ADJ_TICK» » 0x4000 | 42 #define ADJ_TICK 0x4000 |
| 43 #define ADJ_OFFSET_SINGLESHOT» 0x8001 | 43 #define ADJ_OFFSET_SINGLESHOT 0x8001 |
| 44 #define ADJ_OFFSET_SS_READ» 0xa001 | 44 #define ADJ_OFFSET_SS_READ 0xa001 |
| 45 | 45 |
| 46 #define MOD_OFFSET» ADJ_OFFSET | 46 #define MOD_OFFSET ADJ_OFFSET |
| 47 #define MOD_FREQUENCY» ADJ_FREQUENCY | 47 #define MOD_FREQUENCY ADJ_FREQUENCY |
| 48 #define MOD_MAXERROR» ADJ_MAXERROR | 48 #define MOD_MAXERROR ADJ_MAXERROR |
| 49 #define MOD_ESTERROR» ADJ_ESTERROR | 49 #define MOD_ESTERROR ADJ_ESTERROR |
| 50 #define MOD_STATUS» ADJ_STATUS | 50 #define MOD_STATUS ADJ_STATUS |
| 51 #define MOD_TIMECONST» ADJ_TIMECONST | 51 #define MOD_TIMECONST ADJ_TIMECONST |
| 52 #define MOD_CLKB» ADJ_TICK | 52 #define MOD_CLKB ADJ_TICK |
| 53 #define MOD_CLKA» ADJ_OFFSET_SINGLESHOT | 53 #define MOD_CLKA ADJ_OFFSET_SINGLESHOT |
| 54 #define MOD_TAI»» ADJ_TAI | 54 #define MOD_TAI ADJ_TAI |
| 55 #define MOD_MICRO» ADJ_MICRO | 55 #define MOD_MICRO ADJ_MICRO |
| 56 #define MOD_NANO» ADJ_NANO | 56 #define MOD_NANO ADJ_NANO |
| 57 | 57 |
| 58 #define STA_PLL»» 0x0001 | 58 #define STA_PLL 0x0001 |
| 59 #define STA_PPSFREQ» 0x0002 | 59 #define STA_PPSFREQ 0x0002 |
| 60 #define STA_PPSTIME» 0x0004 | 60 #define STA_PPSTIME 0x0004 |
| 61 #define STA_FLL»» 0x0008 | 61 #define STA_FLL 0x0008 |
| 62 | 62 |
| 63 #define STA_INS»» 0x0010 | 63 #define STA_INS 0x0010 |
| 64 #define STA_DEL»» 0x0020 | 64 #define STA_DEL 0x0020 |
| 65 #define STA_UNSYNC» 0x0040 | 65 #define STA_UNSYNC 0x0040 |
| 66 #define STA_FREQHOLD» 0x0080 | 66 #define STA_FREQHOLD 0x0080 |
| 67 | 67 |
| 68 #define STA_PPSSIGNAL» 0x0100 | 68 #define STA_PPSSIGNAL 0x0100 |
| 69 #define STA_PPSJITTER» 0x0200 | 69 #define STA_PPSJITTER 0x0200 |
| 70 #define STA_PPSWANDER» 0x0400 | 70 #define STA_PPSWANDER 0x0400 |
| 71 #define STA_PPSERROR» 0x0800 | 71 #define STA_PPSERROR 0x0800 |
| 72 | 72 |
| 73 #define STA_CLOCKERR» 0x1000 | 73 #define STA_CLOCKERR 0x1000 |
| 74 #define STA_NANO» 0x2000 | 74 #define STA_NANO 0x2000 |
| 75 #define STA_MODE» 0x4000 | 75 #define STA_MODE 0x4000 |
| 76 #define STA_CLK»» 0x8000 | 76 #define STA_CLK 0x8000 |
| 77 | 77 |
| 78 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ | 78 #define STA_RONLY \ |
| 79 STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) | 79 (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | \ |
| 80 STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) |
| 80 | 81 |
| 81 #define TIME_OK»» 0 | 82 #define TIME_OK 0 |
| 82 #define TIME_INS» 1 | 83 #define TIME_INS 1 |
| 83 #define TIME_DEL» 2 | 84 #define TIME_DEL 2 |
| 84 #define TIME_OOP» 3 | 85 #define TIME_OOP 3 |
| 85 #define TIME_WAIT» 4 | 86 #define TIME_WAIT 4 |
| 86 #define TIME_ERROR» 5 | 87 #define TIME_ERROR 5 |
| 87 #define TIME_BAD» TIME_ERROR | 88 #define TIME_BAD TIME_ERROR |
| 88 | 89 |
| 89 #define MAXTC» » 6 | 90 #define MAXTC 6 |
| 90 | 91 |
| 91 int adjtimex(struct timex *); | 92 int adjtimex(struct timex*); |
| 92 int clock_adjtime(clockid_t, struct timex *); | 93 int clock_adjtime(clockid_t, struct timex*); |
| 93 | 94 |
| 94 #ifdef __cplusplus | 95 #ifdef __cplusplus |
| 95 } | 96 } |
| 96 #endif | 97 #endif |
| 97 | 98 |
| 98 #endif | 99 #endif |
| OLD | NEW |