Lines Matching +full:start +full:- +full:year

2  * clocktime - compute the NTP date from a day of year, hour, minute
21 * change when we are already less than a half year from the receive
22 * time stamp. Since the length of a year is variable we use a
35 * Take a time spec given as day-of-year, hour, minute and second as
37 * '*ts_ui'. The value will be in the range (rec_ui-0.5yrs) to
38 * (rec_ui+0.5yrs). A hint for the current start-of-year will be
42 * '*yearstart' will receive the associated start-of-year.
45 * (+/-4hrs) around the receive time by returning a non-zero value.
49 * 32-bit arithmetic.
53 int yday , /* day-of-year */ in clocktime()
59 u_long *yearstart, /* cached start-of-year, should be fixed to u_int32 */ in clocktime()
62 u_int32 ystt[3]; /* year start */ in clocktime()
68 * Compute the offset into the year in seconds. Note that in clocktime()
74 HRSPERDAY * ((int32)yday - 1)))); in clocktime()
76 * Based on the cached year start, do a first attempt. Be in clocktime()
78 * the receive time stamp. Do this only if the cached year in clocktime()
79 * start is not zero, which will not happen after 1900 for the in clocktime()
83 /* -- get time stamp of potential solution */ in clocktime()
85 /* -- calc absolute difference to receive time */ in clocktime()
86 diff[0] = test[0] - rec_ui; in clocktime()
89 /* -- can't get closer if diff < NEARTIME */ in clocktime()
99 * about the year to start with. This takes us on the spot in clocktime()
100 * with a fuzz of +/-1 year. in clocktime()
106 y = ntp_to_year(rec_ui - tmp); in clocktime()
108 /* -- get year start of potential solution */ in clocktime()
109 ystt[idx] = year_to_ntp(y + idx - 1); in clocktime()
110 /* -- get time stamp of potential solution */ in clocktime()
112 /* -- calc absolute difference to receive time */ in clocktime()
113 diff[idx] = test[idx] - rec_ui; in clocktime()
117 /* -*- assume current year fits best, then search best fit */ in clocktime()
121 /* -*- store results and update year start */ in clocktime()
125 /* -*- tell if we could get into CLOSETIME*/ in clocktime()
138 s = ntpcal_split_eradays(s.hi + DAY_NTP_STARTS - 1, NULL); in ntp_to_year()
144 int32 year) in year_to_ntp() argument
147 days = ntpcal_days_in_years(year-1) - DAY_NTP_STARTS + 1; in year_to_ntp()