⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 104

📁 Unix/Linux 网络时间协议版本3 Network Time Protocol Version 3 (NTP) distribution for Unix systems
💻
字号:
Received: from samuraj.c3l.tyreso.se by huey.udel.edu id aa09657;          12 Mar 97 10:39 ESTReceived: (from juha@localhost)	by samuraj.c3l.tyreso.se (8.8.5/8.8.5) id QAA16250;	Wed, 12 Mar 1997 16:39:27 +0100Date: Wed, 12 Mar 1997 16:39:27 +0100From: Juha Sarlin <juha@c3l.tyreso.se>Message-Id: <199703121539.QAA16250@samuraj.c3l.tyreso.se>To: Mills@huey.udel.eduCC: stenn@whimsy.udel.eduIn-reply-to: <9703121007.aa09523@huey.udel.edu> (Mills@huey.udel.edu)Subject: Re: loopfilter fix> Can I trouble you for the old and new clock discipline constants?The constants in ntp.h are unchanged:#define	CLOCK_FREQ	16	/* log2 frequency weight (65536) */#define	CLOCK_PHASE	6	/* log2 phase weight (64) */But I changed the code, like this:*** ntp_loopfilter.c.orig	Sat Feb  8 16:41:48 1997--- ntp_loopfilter.c	Wed Mar 12 16:29:34 1997****************** 77,80 ****--- 77,81 ----  s_fp drift_comp;		/* pll frequency (ppm) */  static long clock_adjust;	/* clock adjust (fraction only) */+ static int time_constant;	/* pll time constant */  static s_fp max_comp;		/* max frequency offset (ppm) */  int tc_counter;			/* poll-adjust counter */****************** 189,193 ****  	s_fp stmp;  	u_long interval;- 	int time_constant;  #if defined(KERNEL_PLL)  	struct timex ntv;--- 190,193 ----****************** 437,444 ****  			drift_comp += stmp >> CLOCK_G;  	}! 	if (offset < 0)! 		clock_adjust = -(-offset >> time_constant);! 	else! 		clock_adjust = offset >> time_constant;    	/*--- 437,441 ----  			drift_comp += stmp >> CLOCK_G;  	}! 	clock_adjust = offset;    	/******************* 565,571 ****  	adjustment = clock_adjust;  	if (adjustment < 0)! 		adjustment = -(-adjustment >> CLOCK_PHASE);  	else! 		adjustment >>= CLOCK_PHASE;  	clock_adjust -= adjustment;  	if (drift_comp < 0)--- 562,568 ----  	adjustment = clock_adjust;  	if (adjustment < 0)! 		adjustment = -(-adjustment >> CLOCK_PHASE + time_constant);  	else! 		adjustment >>= CLOCK_PHASE + time_constant;  	clock_adjust -= adjustment;  	if (drift_comp < 0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -