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

📄 read_local.c

📁 ftam等标准协议服务器和客户端的源代码。
💻 C
字号:
#include "ntp-config.h"#ifdef	REFCLOCK/* *  A dummy clock reading routine that reads the current system time. *  from the local host.  Its possible that this could be actually used *  if the system was in fact a very accurate time keeper (a true real-time *  system with good crystal clock or better). */#include "ntp.h"#include <sys/types.h>#include <sys/time.h>extern LLog *pgm_log;/* ARGSUSED */int init_clock_local(file)char *file;{	struct intf *ap;	int	acount;	ap = getintf (&acount);	ap -> name = "LOCAL";	ap -> addr.type = 0;	ap -> inum = acount;	return acount;	/* invalid if we ever use it */}/* ARGSUSED */read_clock_local(cfd, tvp, mtvp)int cfd;struct timeval **tvp, **mtvp;{	static struct timeval realtime, mytime;	TRACE (2, ("read_local_clock"));	(void) gettimeofday(&realtime, (struct timezone *)0);	mytime = realtime;	*tvp = &realtime;	*mtvp = &mytime;	return(0);}#endif

⌨️ 快捷键说明

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