Deleted Added
full compact
kern_ntptime.c (33690) kern_ntptime.c (34961)
1/******************************************************************************
2 * *
3 * Copyright (c) David L. Mills 1993, 1994 *
4 * *
5 * Permission to use, copy, modify, and distribute this software and its *
6 * documentation for any purpose and without fee is hereby granted, provided *
7 * that the above copyright notice appears in all copies and that both the *
8 * copyright notice and this permission notice appear in supporting *

--- 241 unchanged lines hidden (view full) ---

250 time_offset = ltemp << SHIFT_UPDATE;
251
252 /*
253 * Select whether the frequency is to be controlled and in which
254 * mode (PLL or FLL). Clamp to the operating range. Ugly
255 * multiply/divide should be replaced someday.
256 */
257 if (time_status & STA_FREQHOLD || time_reftime == 0)
1/******************************************************************************
2 * *
3 * Copyright (c) David L. Mills 1993, 1994 *
4 * *
5 * Permission to use, copy, modify, and distribute this software and its *
6 * documentation for any purpose and without fee is hereby granted, provided *
7 * that the above copyright notice appears in all copies and that both the *
8 * copyright notice and this permission notice appear in supporting *

--- 241 unchanged lines hidden (view full) ---

250 time_offset = ltemp << SHIFT_UPDATE;
251
252 /*
253 * Select whether the frequency is to be controlled and in which
254 * mode (PLL or FLL). Clamp to the operating range. Ugly
255 * multiply/divide should be replaced someday.
256 */
257 if (time_status & STA_FREQHOLD || time_reftime == 0)
258 time_reftime = time.tv_sec;
259 mtemp = time.tv_sec - time_reftime;
260 time_reftime = time.tv_sec;
258 time_reftime = time_second;
259 mtemp = time_second - time_reftime;
260 time_reftime = time_second;
261 if (time_status & STA_FLL) {
262 if (mtemp >= MINSEC) {
263 ltemp = ((time_offset / mtemp) << (SHIFT_USEC -
264 SHIFT_UPDATE));
265 if (ltemp < 0)
266 time_freq -= -ltemp >> SHIFT_KH;
267 else
268 time_freq += ltemp >> SHIFT_KH;

--- 543 unchanged lines hidden ---
261 if (time_status & STA_FLL) {
262 if (mtemp >= MINSEC) {
263 ltemp = ((time_offset / mtemp) << (SHIFT_USEC -
264 SHIFT_UPDATE));
265 if (ltemp < 0)
266 time_freq -= -ltemp >> SHIFT_KH;
267 else
268 time_freq += ltemp >> SHIFT_KH;

--- 543 unchanged lines hidden ---