Home
last modified time | relevance | path

Searched refs:clock_time (Results 1 – 16 of 16) sorted by relevance

/freebsd/contrib/ntp/parseutil/
H A Dtestdcf.c219 register clocktime_t *clock_time in convert_rawdcf() argument
240 clock_time->flags = 0; in convert_rawdcf()
241 clock_time->usecond= 0; in convert_rawdcf()
242 clock_time->second = 0; in convert_rawdcf()
243 clock_time->minute = ext_bf(buffer, DCF_M10); in convert_rawdcf()
244 clock_time->minute = TIMES10(clock_time->minute) + ext_bf(buffer, DCF_M1); in convert_rawdcf()
245 clock_time->hour = ext_bf(buffer, DCF_H10); in convert_rawdcf()
246 clock_time->hour = TIMES10(clock_time->hour) + ext_bf(buffer, DCF_H1); in convert_rawdcf()
247 clock_time->day = ext_bf(buffer, DCF_D10); in convert_rawdcf()
248 clock_time->day = TIMES10(clock_time->day) + ext_bf(buffer, DCF_D1); in convert_rawdcf()
[all …]
H A Ddcfd.c441 clocktime_t *clock_time in convert_rawdcf() argument
462 clock_time->flags = 0; in convert_rawdcf()
463 clock_time->usecond= 0; in convert_rawdcf()
464 clock_time->second = 0; in convert_rawdcf()
465 clock_time->minute = ext_bf(buffer, DCF_M10); in convert_rawdcf()
466 clock_time->minute = TIMES10(clock_time->minute) + ext_bf(buffer, DCF_M1); in convert_rawdcf()
467 clock_time->hour = ext_bf(buffer, DCF_H10); in convert_rawdcf()
468 clock_time->hour = TIMES10(clock_time->hour) + ext_bf(buffer, DCF_H1); in convert_rawdcf()
469 clock_time->day = ext_bf(buffer, DCF_D10); in convert_rawdcf()
470 clock_time->day = TIMES10(clock_time->day) + ext_bf(buffer, DCF_D1); in convert_rawdcf()
[all …]
/freebsd/contrib/ntp/libparse/
H A Dclk_meinberg.c274 clocktime_t *clock_time, in cvt_meinberg() argument
302 if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day, in cvt_meinberg()
304 Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month, in cvt_meinberg()
306 Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year, in cvt_meinberg()
308 Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour, in cvt_meinberg()
310 Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute, in cvt_meinberg()
312 Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second, in cvt_meinberg()
321 clock_time->usecond = 0; in cvt_meinberg()
322 clock_time->flags = PARSEB_S_LEAP; in cvt_meinberg()
324 if (clock_time in cvt_meinberg()
472 cvt_mgps(unsigned char * buffer,int size,struct format * format,clocktime_t * clock_time,void * local) cvt_mgps() argument
[all...]
H A Dclk_schmid.c112 clocktime_t *clock_time, in cvt_schmid() argument
134 clock_time->hour = buffer[0]; in cvt_schmid()
135 clock_time->minute = buffer[1]; in cvt_schmid()
136 clock_time->second = buffer[2]; in cvt_schmid()
137 clock_time->usecond = buffer[3] * 100000; in cvt_schmid()
138 clock_time->day = buffer[4]; in cvt_schmid()
139 clock_time->month = buffer[5]; in cvt_schmid()
140 clock_time->year = buffer[6]; in cvt_schmid()
142 clock_time->flags = 0; in cvt_schmid()
147 clock_time in cvt_schmid()
[all...]
H A Dclk_hopf6021.c141 clocktime_t *clock_time, in cvt_hopf6021() argument
152 if ( STOI(O_DAY, &clock_time->day) || in cvt_hopf6021()
153 STOI(O_MONTH, &clock_time->month) || in cvt_hopf6021()
154 STOI(O_YEAR, &clock_time->year) || in cvt_hopf6021()
155 STOI(O_HOUR, &clock_time->hour) || in cvt_hopf6021()
156 STOI(O_MIN, &clock_time->minute) || in cvt_hopf6021()
157 STOI(O_SEC, &clock_time->second) in cvt_hopf6021()
163 clock_time->usecond = 0; in cvt_hopf6021()
164 clock_time->flags = 0; in cvt_hopf6021()
176 clock_time in cvt_hopf6021()
[all...]
H A Dclk_rawdcf.c225 clocktime_t *clock_time, in zeller_expand() argument
229 unsigned int y = (unsigned int)clock_time->year; in zeller_expand()
230 unsigned int m = (unsigned int)clock_time->month - 1u; in zeller_expand()
231 unsigned int d = (unsigned int)clock_time->day - 1u; in zeller_expand()
271 clock_time->year = (int)y + ((y < 370u) ? 2000 : 1600); in zeller_expand()
280 clocktime_t *clock_time in convert_rawdcf() argument
328 clock_time->flags = PARSEB_S_CALLBIT|PARSEB_S_LEAP; in convert_rawdcf()
329 clock_time->utctime= 0; in convert_rawdcf()
330 clock_time->usecond= 0; in convert_rawdcf()
331 clock_time in convert_rawdcf()
398 cvt_rawdcf(unsigned char * buffer,int size,struct format * param,clocktime_t * clock_time,void * local) cvt_rawdcf() argument
[all...]
H A Dparse.c401 register clocktime_t *clock_time, in parse_to_unixtime() argument
413 if (clock_time->utctime) in parse_to_unixtime()
414 return clock_time->utctime; /* if the conversion routine gets it right away - why not */ in parse_to_unixtime()
416 if ( clock_time->year < YEAR_PIVOT ) /* Y2KFixes [ */ in parse_to_unixtime()
417 clock_time->year += 100; /* convert 20xx%100 to 20xx-1900 */ in parse_to_unixtime()
418 if ( clock_time->year < YEAR_BREAK ) /* expand to full four-digits */ in parse_to_unixtime()
419 clock_time->year += 1900; in parse_to_unixtime()
421 if (clock_time->year < 1970 ) /* Y2KFixes ] */ in parse_to_unixtime()
430 t = julian0(clock_time->year) - julian0(1970); /* Y2kFixes */ in parse_to_unixtime()
432 if (clock_time in parse_to_unixtime()
686 clocktime_t clock_time; timepacket() local
[all...]
H A Dclk_wharton.c86 clocktime_t *clock_time, in cvt_wharton_400a() argument
99 clock_time->second = (buffer[2] - '0') * 10 + buffer[1] - '0'; in cvt_wharton_400a()
100 clock_time->minute = (buffer[4] - '0') * 10 + buffer[3] - '0'; in cvt_wharton_400a()
101 clock_time->hour = (buffer[6] - '0') * 10 + buffer[5] - '0'; in cvt_wharton_400a()
102 clock_time->day = (buffer[8] - '0') * 10 + buffer[7] - '0'; in cvt_wharton_400a()
103 clock_time->month = (buffer[10] - '0') * 10 + buffer[9] - '0'; in cvt_wharton_400a()
104 clock_time->year = (buffer[12] - '0') * 10 + buffer[11] - '0'; in cvt_wharton_400a()
105 clock_time->usecond = 0; in cvt_wharton_400a()
107 clock_time->utcoffset = -1*60*60; in cvt_wharton_400a()
109 clock_time in cvt_wharton_400a()
[all...]
H A Dclk_rcc8000.c80 clocktime_t *clock_time, in cvt_rcc8000() argument
87 if ( STOI(O_DAY, &clock_time->day) || in cvt_rcc8000()
88 STOI(O_MONTH, &clock_time->month) || in cvt_rcc8000()
89 STOI(O_YEAR, &clock_time->year) || in cvt_rcc8000()
90 STOI(O_HOUR, &clock_time->hour) || in cvt_rcc8000()
91 STOI(O_MIN, &clock_time->minute) || in cvt_rcc8000()
92 STOI(O_SEC, &clock_time->second) || in cvt_rcc8000()
93 STOI(O_USEC, &clock_time->usecond) in cvt_rcc8000()
95 clock_time->usecond *= 1000; in cvt_rcc8000()
97 clock_time in cvt_rcc8000()
[all...]
H A Dclk_sel240x.c126 clocktime_t *clock_time, in cvt_sel240x() argument
144 clock_time->day = ptime.tm_mday; in cvt_sel240x()
145 clock_time->month = ptime.tm_mon + 1; in cvt_sel240x()
146 clock_time->year = ptime.tm_year + 1900; in cvt_sel240x()
147 clock_time->hour = ptime.tm_hour; in cvt_sel240x()
148 clock_time->minute = ptime.tm_min; in cvt_sel240x()
149 clock_time->second = ptime.tm_sec; in cvt_sel240x()
150 clock_time->usecond = 0; in cvt_sel240x()
151 clock_time->utcoffset = 0; in cvt_sel240x()
152 clock_time in cvt_sel240x()
[all...]
H A Dclk_dcf7000.c92 clocktime_t *clock_time, in cvt_dcf7000() argument
102 if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day, in cvt_dcf7000()
104 Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month, in cvt_dcf7000()
106 Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year, in cvt_dcf7000()
108 Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour, in cvt_dcf7000()
110 Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute, in cvt_dcf7000()
112 Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second, in cvt_dcf7000()
122 clock_time->flags = 0; in cvt_dcf7000()
123 clock_time->usecond = 0; in cvt_dcf7000()
132 clock_time in cvt_dcf7000()
[all...]
H A Dclk_trimtaip.c101 clocktime_t *clock_time, in cvt_trimtaip() argument
115 if ( STOI(O_DAY, &clock_time->day) || in cvt_trimtaip()
116 STOI(O_MONTH, &clock_time->month) || in cvt_trimtaip()
117 STOI(O_YEAR, &clock_time->year) || in cvt_trimtaip()
118 STOI(O_HOUR, &clock_time->hour) || in cvt_trimtaip()
119 STOI(O_MIN, &clock_time->minute) || in cvt_trimtaip()
120 STOI(O_SEC, &clock_time->second) || in cvt_trimtaip()
121 STOI(O_USEC, &clock_time->usecond)|| in cvt_trimtaip()
125 clock_time->usecond *= 1000; in cvt_trimtaip()
133 clock_time in cvt_trimtaip()
[all...]
H A Dclk_varitext.c140 clocktime_t *clock_time, in cvt_varitext() argument
148 if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day, in cvt_varitext()
150 Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month, in cvt_varitext()
152 Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year, in cvt_varitext()
154 Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour, in cvt_varitext()
156 Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute, in cvt_varitext()
158 Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second, in cvt_varitext()
164 clock_time->flags = 0; in cvt_varitext()
165 clock_time->utcoffset = 0; in cvt_varitext()
169 clock_time in cvt_varitext()
[all...]
H A Dclk_computime.c115 clocktime_t *clock_time, in cvt_computime() argument
123 if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day, in cvt_computime()
125 Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month, in cvt_computime()
127 Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year, in cvt_computime()
129 Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour, in cvt_computime()
131 Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute, in cvt_computime()
133 Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second, in cvt_computime()
138 clock_time->flags = 0; in cvt_computime()
139 clock_time->utcoffset = 0; /* We have UTC time */ in cvt_computime()
H A Dclk_trimtsip.c222 clocktime_t *clock_time, in cvt_trimtsip() argument
230 clock_time->flags = 0; in cvt_trimtsip()
265 clock_time->flags = PARSEB_POWERUP; in cvt_trimtsip()
284 clock_time->utctime = gpstime.l_ui - JAN_1970; in cvt_trimtsip()
286 TSFTOTVU(gpstime.l_uf, clock_time->usecond); in cvt_trimtsip()
289 clock_time->flags |= PARSEB_LEAPADD; in cvt_trimtsip()
292 clock_time->flags |= PARSEB_LEAPDEL; in cvt_trimtsip()
297 clock_time->flags &= ~(PARSEB_POWERUP|PARSEB_NOSYNC); in cvt_trimtsip()
301 clock_time->flags |= PARSEB_NOSYNC; in cvt_trimtsip()
305 clock_time in cvt_trimtsip()
[all...]
/freebsd/contrib/ntp/ntpd/
H A Dcheck_y2k.c328 } Clock_Time, *clock_time; in main() local
330 clock_time = &Clock_Time; in main()
362 clock_time->year = year; in main()
372 t = (clock_time->year - 1970) * 365; in main()
373 t += (clock_time->year >> 2) - (1970 >> 2); in main()
374 t -= clock_time->year / 100 - 1970 / 100; in main()
375 t += clock_time->year / 400 - 1970 / 400; in main()