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

📄 mkepoch.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#if !defined(lint) && defined(SCCSIDS)static	char sccsid[] = "@(#)mkepoch.c 1.1 92/07/30 SMI";#endif/* * Copyright (c) 1986 Sun Microsystems Inc. *//* * Put out a C declaration which initializes "epoch" to the time ("tv_sec" * portion) when this program was run. */#include <stdio.h>#include <sys/time.h>int	gettimeofday();void	perror();void	exit();/*ARGSUSED*/intmain(argc, argv)	int argc;	char **argv;{	struct timeval now;	if (gettimeofday(&now, (struct timezone *)NULL) < 0) {		perror("mkepoch: gettimeofday failed");		exit(1);	}	if (printf("static long epoch = %ld;\n", now.tv_sec) == EOF) {		perror("mkepoch: can't write output");		exit(1);	}	return (0);}

⌨️ 快捷键说明

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