Lines Matching +full:abs +full:- +full:fuzz

2  * clocktime - compute the NTP date from a day of year, hour, minute
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()
64 u_int32 diff[3]; /* abs difference to receive */ in clocktime()
74 HRSPERDAY * ((int32)yday - 1)))); 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()
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()
147 days = ntpcal_days_in_years(year-1) - DAY_NTP_STARTS + 1; in year_to_ntp()