1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * Copyright (c) David L. Mills 1993, 1994 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software and its 5*7c478bd9Sstevel@tonic-gate * documentation for any purpose and without fee is hereby granted, provided 6*7c478bd9Sstevel@tonic-gate * that the above copyright notice appears in all copies and that both the 7*7c478bd9Sstevel@tonic-gate * copyright notice and this permission notice appear in supporting 8*7c478bd9Sstevel@tonic-gate * documentation, and that the name University of Delaware not be used in 9*7c478bd9Sstevel@tonic-gate * advertising or publicity pertaining to distribution of the software 10*7c478bd9Sstevel@tonic-gate * without specific, written prior permission. The University of Delaware 11*7c478bd9Sstevel@tonic-gate * makes no representations about the suitability this software for any 12*7c478bd9Sstevel@tonic-gate * purpose. It is provided "as is" without express or implied warranty. 13*7c478bd9Sstevel@tonic-gate */ 14*7c478bd9Sstevel@tonic-gate 15*7c478bd9Sstevel@tonic-gate /* 16*7c478bd9Sstevel@tonic-gate * Copyright 1996-1997, 2002 Sun Microsystems, Inc. All rights reserved. 17*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 18*7c478bd9Sstevel@tonic-gate */ 19*7c478bd9Sstevel@tonic-gate 20*7c478bd9Sstevel@tonic-gate #ifndef _SYS_TIMEX_H 21*7c478bd9Sstevel@tonic-gate #define _SYS_TIMEX_H 22*7c478bd9Sstevel@tonic-gate 23*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 26*7c478bd9Sstevel@tonic-gate extern "C" { 27*7c478bd9Sstevel@tonic-gate #endif 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 30*7c478bd9Sstevel@tonic-gate #include <sys/time.h> 31*7c478bd9Sstevel@tonic-gate #include <sys/syscall.h> 32*7c478bd9Sstevel@tonic-gate #include <sys/inttypes.h> 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate /* 35*7c478bd9Sstevel@tonic-gate * The following defines establish the engineering parameters of the 36*7c478bd9Sstevel@tonic-gate * phase-lock loop (PLL) model used in the kernel implementation. These 37*7c478bd9Sstevel@tonic-gate * parameters have been carefully chosen by analysis for good stability 38*7c478bd9Sstevel@tonic-gate * and wide dynamic range. 39*7c478bd9Sstevel@tonic-gate * 40*7c478bd9Sstevel@tonic-gate * The hz variable is defined in the kernel build environment. It 41*7c478bd9Sstevel@tonic-gate * establishes the timer interrupt frequency. 42*7c478bd9Sstevel@tonic-gate * 43*7c478bd9Sstevel@tonic-gate * SCALE_KG and SCALE_KF establish the damping of the PLL and are chosen 44*7c478bd9Sstevel@tonic-gate * for a slightly underdamped convergence characteristic. SCALE_KH 45*7c478bd9Sstevel@tonic-gate * establishes the damping of the FLL and is chosen by wisdom and black 46*7c478bd9Sstevel@tonic-gate * art. 47*7c478bd9Sstevel@tonic-gate * 48*7c478bd9Sstevel@tonic-gate * MAXTC establishes the maximum time constant of the PLL. With the 49*7c478bd9Sstevel@tonic-gate * SCALE_KG and SCALE_KF values given and a time constant range from 50*7c478bd9Sstevel@tonic-gate * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours, 51*7c478bd9Sstevel@tonic-gate * respectively. 52*7c478bd9Sstevel@tonic-gate */ 53*7c478bd9Sstevel@tonic-gate #define SCALE_KG (1<<6) /* phase factor (multiplier) */ 54*7c478bd9Sstevel@tonic-gate #define SCALE_KF (1<<16) /* PLL frequency factor (multiplier) */ 55*7c478bd9Sstevel@tonic-gate #define SCALE_KH (1<<2) /* FLL frequency factor (multiplier) */ 56*7c478bd9Sstevel@tonic-gate #define MAXTC (1<<6) /* maximum time constant */ 57*7c478bd9Sstevel@tonic-gate 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate /* 60*7c478bd9Sstevel@tonic-gate * The following defines establish the scaling of the various variables 61*7c478bd9Sstevel@tonic-gate * used by the PLL. They are chosen to allow the greatest precision 62*7c478bd9Sstevel@tonic-gate * possible without overflow of a 32-bit word. 63*7c478bd9Sstevel@tonic-gate * 64*7c478bd9Sstevel@tonic-gate * SCALE_PHASE defines the scaling (multiplier) of the time_phase variable, 65*7c478bd9Sstevel@tonic-gate * which serves as a an extension to the low-order bits of the system 66*7c478bd9Sstevel@tonic-gate * clock variable time.tv_usec. 67*7c478bd9Sstevel@tonic-gate * 68*7c478bd9Sstevel@tonic-gate * SCALE_UPDATE defines the scaling (multiplier) of the time_offset variable, 69*7c478bd9Sstevel@tonic-gate * which represents the current time offset with respect to standard 70*7c478bd9Sstevel@tonic-gate * time. 71*7c478bd9Sstevel@tonic-gate * 72*7c478bd9Sstevel@tonic-gate * SCALE_USEC defines the scaling (multiplier) of the time_freq and 73*7c478bd9Sstevel@tonic-gate * time_tolerance variables, which represent the current frequency 74*7c478bd9Sstevel@tonic-gate * offset and maximum frequency tolerance. 75*7c478bd9Sstevel@tonic-gate * 76*7c478bd9Sstevel@tonic-gate * FINEUSEC is 1 us in SCALE_UPDATE units of the time_phase variable. 77*7c478bd9Sstevel@tonic-gate */ 78*7c478bd9Sstevel@tonic-gate #define SCALE_PHASE (1<<22) /* phase scale */ 79*7c478bd9Sstevel@tonic-gate #define SCALE_USEC (1<<16) 80*7c478bd9Sstevel@tonic-gate #define SCALE_UPDATE (SCALE_KG * MAXTC) /* */ 81*7c478bd9Sstevel@tonic-gate #define FINEUSEC (1<<22) /* 1 us in phase units */ 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate /* 84*7c478bd9Sstevel@tonic-gate * The following defines establish the performance envelope of the PLL. 85*7c478bd9Sstevel@tonic-gate * They insure it operates within predefined limits, in order to satisfy 86*7c478bd9Sstevel@tonic-gate * correctness assertions. An excursion which exceeds these bounds is 87*7c478bd9Sstevel@tonic-gate * clamped to the bound and operation proceeds accordingly. In practice, 88*7c478bd9Sstevel@tonic-gate * this can occur only if something has failed or is operating out of 89*7c478bd9Sstevel@tonic-gate * tolerance, but otherwise the PLL continues to operate in a stable 90*7c478bd9Sstevel@tonic-gate * mode. 91*7c478bd9Sstevel@tonic-gate * 92*7c478bd9Sstevel@tonic-gate * MAXPHASE must be set greater than or equal to CLOCK.MAX (128 ms), as 93*7c478bd9Sstevel@tonic-gate * defined in the NTP specification. CLOCK.MAX establishes the maximum 94*7c478bd9Sstevel@tonic-gate * time offset allowed before the system time is reset, rather than 95*7c478bd9Sstevel@tonic-gate * incrementally adjusted. Here, the maximum offset is clamped to 96*7c478bd9Sstevel@tonic-gate * MAXPHASE only in order to prevent overflow errors due to defective 97*7c478bd9Sstevel@tonic-gate * protocol implementations. 98*7c478bd9Sstevel@tonic-gate * 99*7c478bd9Sstevel@tonic-gate * MAXFREQ is the maximum frequency tolerance of the CPU clock 100*7c478bd9Sstevel@tonic-gate * oscillator plus the maximum slew rate allowed by the protocol. It 101*7c478bd9Sstevel@tonic-gate * should be set to at least the frequency tolerance of the oscillator 102*7c478bd9Sstevel@tonic-gate * plus 100 ppm for vernier frequency adjustments. The oscillator time and 103*7c478bd9Sstevel@tonic-gate * frequency are disciplined to an external source, presumably with 104*7c478bd9Sstevel@tonic-gate * negligible time and frequency error relative to UTC, and MAXFREQ can 105*7c478bd9Sstevel@tonic-gate * be reduced. 106*7c478bd9Sstevel@tonic-gate * 107*7c478bd9Sstevel@tonic-gate * MAXTIME is the maximum jitter tolerance of the PPS signal. 108*7c478bd9Sstevel@tonic-gate * 109*7c478bd9Sstevel@tonic-gate * MINSEC and MAXSEC define the lower and upper bounds on the interval 110*7c478bd9Sstevel@tonic-gate * between protocol updates. 111*7c478bd9Sstevel@tonic-gate */ 112*7c478bd9Sstevel@tonic-gate #define MAXPHASE 512000 /* max phase error (us) */ 113*7c478bd9Sstevel@tonic-gate #define MAXFREQ (512 * SCALE_USEC) /* max freq error (100 ppm) */ 114*7c478bd9Sstevel@tonic-gate #define MAXTIME (200 << PPS_AVG) /* max PPS error (jitter) (200 us) */ 115*7c478bd9Sstevel@tonic-gate #define MINSEC 16 /* min interval between updates (s) */ 116*7c478bd9Sstevel@tonic-gate #define MAXSEC 1200 /* max interval between updates (s) */ 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate /* 119*7c478bd9Sstevel@tonic-gate * The following defines are used only if a pulse-per-second (PPS) 120*7c478bd9Sstevel@tonic-gate * signal is available and connected via a modem control lead, such as 121*7c478bd9Sstevel@tonic-gate * produced by the optional ppsclock feature incorporated in the Sun 122*7c478bd9Sstevel@tonic-gate * asynch driver. They establish the design parameters of the frequency- 123*7c478bd9Sstevel@tonic-gate * lock loop used to discipline the CPU clock oscillator to the PPS 124*7c478bd9Sstevel@tonic-gate * signal. 125*7c478bd9Sstevel@tonic-gate * 126*7c478bd9Sstevel@tonic-gate * PPS_AVG is the averaging factor for the frequency loop, as well as 127*7c478bd9Sstevel@tonic-gate * the time and frequency dispersion. 128*7c478bd9Sstevel@tonic-gate * 129*7c478bd9Sstevel@tonic-gate * PPS_SHIFT and PPS_SHIFTMAX specify the minimum and maximum 130*7c478bd9Sstevel@tonic-gate * calibration intervals, respectively, in seconds as a power of two. 131*7c478bd9Sstevel@tonic-gate * 132*7c478bd9Sstevel@tonic-gate * PPS_VALID is the maximum interval before the PPS signal is considered 133*7c478bd9Sstevel@tonic-gate * invalid and protocol updates used directly instead. 134*7c478bd9Sstevel@tonic-gate * 135*7c478bd9Sstevel@tonic-gate * MAXGLITCH is the maximum interval before a time offset of more than 136*7c478bd9Sstevel@tonic-gate * MAXTIME is believed. 137*7c478bd9Sstevel@tonic-gate */ 138*7c478bd9Sstevel@tonic-gate #define PPS_AVG 2 /* pps averaging constant (shift) */ 139*7c478bd9Sstevel@tonic-gate #define PPS_SHIFT 2 /* min interval duration (s) (shift) */ 140*7c478bd9Sstevel@tonic-gate #define PPS_SHIFTMAX 8 /* max interval duration (s) (shift) */ 141*7c478bd9Sstevel@tonic-gate #define PPS_VALID 120 /* pps signal watchdog max (s) */ 142*7c478bd9Sstevel@tonic-gate #define MAXGLITCH 30 /* pps signal glitch max (s) */ 143*7c478bd9Sstevel@tonic-gate 144*7c478bd9Sstevel@tonic-gate /* 145*7c478bd9Sstevel@tonic-gate * The following defines and structures define the user interface for 146*7c478bd9Sstevel@tonic-gate * the ntp_gettime() and ntp_adjtime() system calls. 147*7c478bd9Sstevel@tonic-gate * 148*7c478bd9Sstevel@tonic-gate * Control mode codes (timex.modes) 149*7c478bd9Sstevel@tonic-gate */ 150*7c478bd9Sstevel@tonic-gate #define MOD_OFFSET 0x0001 /* set time offset */ 151*7c478bd9Sstevel@tonic-gate #define MOD_FREQUENCY 0x0002 /* set frequency offset */ 152*7c478bd9Sstevel@tonic-gate #define MOD_MAXERROR 0x0004 /* set maximum time error */ 153*7c478bd9Sstevel@tonic-gate #define MOD_ESTERROR 0x0008 /* set estimated time error */ 154*7c478bd9Sstevel@tonic-gate #define MOD_STATUS 0x0010 /* set clock status bits */ 155*7c478bd9Sstevel@tonic-gate #define MOD_TIMECONST 0x0020 /* set pll time constant */ 156*7c478bd9Sstevel@tonic-gate #define MOD_CLKB 0x4000 /* set clock B */ 157*7c478bd9Sstevel@tonic-gate #define MOD_CLKA 0x8000 /* set clock A */ 158*7c478bd9Sstevel@tonic-gate 159*7c478bd9Sstevel@tonic-gate /* 160*7c478bd9Sstevel@tonic-gate * Status codes (timex.status) 161*7c478bd9Sstevel@tonic-gate */ 162*7c478bd9Sstevel@tonic-gate #define STA_PLL 0x0001 /* enable PLL updates (rw) */ 163*7c478bd9Sstevel@tonic-gate #define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */ 164*7c478bd9Sstevel@tonic-gate #define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */ 165*7c478bd9Sstevel@tonic-gate #define STA_FLL 0x0008 /* select frequency-lock mode (rw) */ 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gate #define STA_INS 0x0010 /* insert leap (rw) */ 168*7c478bd9Sstevel@tonic-gate #define STA_DEL 0x0020 /* delete leap (rw) */ 169*7c478bd9Sstevel@tonic-gate #define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */ 170*7c478bd9Sstevel@tonic-gate #define STA_FREQHOLD 0x0080 /* hold frequency (rw) */ 171*7c478bd9Sstevel@tonic-gate 172*7c478bd9Sstevel@tonic-gate #define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */ 173*7c478bd9Sstevel@tonic-gate #define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */ 174*7c478bd9Sstevel@tonic-gate #define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */ 175*7c478bd9Sstevel@tonic-gate #define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */ 176*7c478bd9Sstevel@tonic-gate 177*7c478bd9Sstevel@tonic-gate #define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */ 178*7c478bd9Sstevel@tonic-gate 179*7c478bd9Sstevel@tonic-gate #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ 180*7c478bd9Sstevel@tonic-gate STA_PPSERROR | STA_CLOCKERR) /* read-only bits */ 181*7c478bd9Sstevel@tonic-gate 182*7c478bd9Sstevel@tonic-gate /* 183*7c478bd9Sstevel@tonic-gate * Clock states (time_state) 184*7c478bd9Sstevel@tonic-gate */ 185*7c478bd9Sstevel@tonic-gate #define TIME_OK 0 /* no leap second warning */ 186*7c478bd9Sstevel@tonic-gate #define TIME_INS 1 /* insert leap second warning */ 187*7c478bd9Sstevel@tonic-gate #define TIME_DEL 2 /* delete leap second warning */ 188*7c478bd9Sstevel@tonic-gate #define TIME_OOP 3 /* leap second in progress */ 189*7c478bd9Sstevel@tonic-gate #define TIME_WAIT 4 /* leap second has occured */ 190*7c478bd9Sstevel@tonic-gate #define TIME_ERROR 5 /* clock not synchronized */ 191*7c478bd9Sstevel@tonic-gate 192*7c478bd9Sstevel@tonic-gate /* 193*7c478bd9Sstevel@tonic-gate * NTP user interface (ntp_gettime()) - used to read kernel clock values 194*7c478bd9Sstevel@tonic-gate * 195*7c478bd9Sstevel@tonic-gate * Note: maximum error = NTP synch distance = dispersion + delay / 2; 196*7c478bd9Sstevel@tonic-gate * estimated error = NTP dispersion. 197*7c478bd9Sstevel@tonic-gate */ 198*7c478bd9Sstevel@tonic-gate struct ntptimeval { 199*7c478bd9Sstevel@tonic-gate struct timeval time; /* current time (ro) */ 200*7c478bd9Sstevel@tonic-gate int32_t maxerror; /* maximum error (us) (ro) */ 201*7c478bd9Sstevel@tonic-gate int32_t esterror; /* estimated error (us) (ro) */ 202*7c478bd9Sstevel@tonic-gate }; 203*7c478bd9Sstevel@tonic-gate 204*7c478bd9Sstevel@tonic-gate #if defined(_SYSCALL32) 205*7c478bd9Sstevel@tonic-gate 206*7c478bd9Sstevel@tonic-gate /* Kernel's view of _ILP32 application's ntptimeval struct */ 207*7c478bd9Sstevel@tonic-gate 208*7c478bd9Sstevel@tonic-gate struct ntptimeval32 { 209*7c478bd9Sstevel@tonic-gate struct timeval32 time; 210*7c478bd9Sstevel@tonic-gate int32_t maxerror; 211*7c478bd9Sstevel@tonic-gate int32_t esterror; 212*7c478bd9Sstevel@tonic-gate }; 213*7c478bd9Sstevel@tonic-gate 214*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 215*7c478bd9Sstevel@tonic-gate 216*7c478bd9Sstevel@tonic-gate /* 217*7c478bd9Sstevel@tonic-gate * NTP daemon interface - (ntp_adjtime()) used to discipline CPU clock 218*7c478bd9Sstevel@tonic-gate * oscillator 219*7c478bd9Sstevel@tonic-gate */ 220*7c478bd9Sstevel@tonic-gate struct timex { 221*7c478bd9Sstevel@tonic-gate uint32_t modes; /* clock mode bits (wo) */ 222*7c478bd9Sstevel@tonic-gate int32_t offset; /* time offset (us) (rw) */ 223*7c478bd9Sstevel@tonic-gate int32_t freq; /* frequency offset (scaled ppm) (rw) */ 224*7c478bd9Sstevel@tonic-gate int32_t maxerror; /* maximum error (us) (rw) */ 225*7c478bd9Sstevel@tonic-gate int32_t esterror; /* estimated error (us) (rw) */ 226*7c478bd9Sstevel@tonic-gate int32_t status; /* clock status bits (rw) */ 227*7c478bd9Sstevel@tonic-gate int32_t constant; /* pll time constant (rw) */ 228*7c478bd9Sstevel@tonic-gate int32_t precision; /* clock precision (us) (ro) */ 229*7c478bd9Sstevel@tonic-gate int32_t tolerance; /* clock freq tolerance (scaled ppm) (ro) */ 230*7c478bd9Sstevel@tonic-gate int32_t ppsfreq; /* pps frequency (scaled ppm) (ro) */ 231*7c478bd9Sstevel@tonic-gate int32_t jitter; /* pps jitter (us) (ro) */ 232*7c478bd9Sstevel@tonic-gate int32_t shift; /* interval duration (s) (shift) (ro) */ 233*7c478bd9Sstevel@tonic-gate int32_t stabil; /* pps stability (scaled ppm) (ro) */ 234*7c478bd9Sstevel@tonic-gate int32_t jitcnt; /* jitter limit exceeded (ro) */ 235*7c478bd9Sstevel@tonic-gate int32_t calcnt; /* calibration intervals (ro) */ 236*7c478bd9Sstevel@tonic-gate int32_t errcnt; /* calibration errors (ro) */ 237*7c478bd9Sstevel@tonic-gate int32_t stbcnt; /* stability limit exceeded (ro) */ 238*7c478bd9Sstevel@tonic-gate }; 239*7c478bd9Sstevel@tonic-gate 240*7c478bd9Sstevel@tonic-gate #if defined(__STDC__) 241*7c478bd9Sstevel@tonic-gate /* 242*7c478bd9Sstevel@tonic-gate * NTP syscalls 243*7c478bd9Sstevel@tonic-gate */ 244*7c478bd9Sstevel@tonic-gate int ntp_gettime(struct ntptimeval *); 245*7c478bd9Sstevel@tonic-gate int ntp_adjtime(struct timex *); 246*7c478bd9Sstevel@tonic-gate #else 247*7c478bd9Sstevel@tonic-gate int ntp_gettime(); 248*7c478bd9Sstevel@tonic-gate int ntp_adjtime(); 249*7c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 250*7c478bd9Sstevel@tonic-gate 251*7c478bd9Sstevel@tonic-gate #ifdef _KERNEL 252*7c478bd9Sstevel@tonic-gate 253*7c478bd9Sstevel@tonic-gate extern int32_t time_state; /* clock state */ 254*7c478bd9Sstevel@tonic-gate extern int32_t time_status; /* clock status bits */ 255*7c478bd9Sstevel@tonic-gate extern int32_t time_offset; /* time adjustment (us) */ 256*7c478bd9Sstevel@tonic-gate extern int32_t time_freq; /* frequency offset (scaled ppm) */ 257*7c478bd9Sstevel@tonic-gate extern int32_t time_maxerror; /* maximum error (us) */ 258*7c478bd9Sstevel@tonic-gate extern int32_t time_esterror; /* estimated error (us) */ 259*7c478bd9Sstevel@tonic-gate extern int32_t time_constant; /* pll time constant */ 260*7c478bd9Sstevel@tonic-gate extern int32_t time_precision; /* clock precision (us) */ 261*7c478bd9Sstevel@tonic-gate extern int32_t time_tolerance; /* frequency tolerance (scaled ppm) */ 262*7c478bd9Sstevel@tonic-gate extern int32_t pps_shift; /* interval duration (s) (shift) */ 263*7c478bd9Sstevel@tonic-gate extern int32_t pps_freq; /* pps frequency offset (scaled ppm) */ 264*7c478bd9Sstevel@tonic-gate extern int32_t pps_jitter; /* pps jitter (us) */ 265*7c478bd9Sstevel@tonic-gate extern int32_t pps_stabil; /* pps stability (scaled ppm) */ 266*7c478bd9Sstevel@tonic-gate extern int32_t pps_jitcnt; /* jitter limit exceeded */ 267*7c478bd9Sstevel@tonic-gate extern int32_t pps_calcnt; /* calibration intervals */ 268*7c478bd9Sstevel@tonic-gate extern int32_t pps_errcnt; /* calibration errors */ 269*7c478bd9Sstevel@tonic-gate extern int32_t pps_stbcnt; /* stability limit exceeded */ 270*7c478bd9Sstevel@tonic-gate 271*7c478bd9Sstevel@tonic-gate extern void clock_update(int); 272*7c478bd9Sstevel@tonic-gate extern void ddi_hardpps(struct timeval *, int); 273*7c478bd9Sstevel@tonic-gate 274*7c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 275*7c478bd9Sstevel@tonic-gate 276*7c478bd9Sstevel@tonic-gate 277*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 278*7c478bd9Sstevel@tonic-gate } 279*7c478bd9Sstevel@tonic-gate #endif 280*7c478bd9Sstevel@tonic-gate 281*7c478bd9Sstevel@tonic-gate #endif /* _SYS_TIMEX_H */ 282