time.c

来自「操作系统SunOS 4.1.3版本的源码」· C语言 代码 · 共 23 行

C
23
字号
#if !defined(lint) && defined(SCCSIDS)static	char sccsid[] = "@(#)time.c 1.1 92/07/30 SMI"; /* from UCB 4.2 83/02/27 */#endif/* * Backwards compatible time call. */#include <sys/types.h>#include <sys/time.h>time_ttime(t)	time_t *t;{	struct timeval tt;	if (gettimeofday(&tt, (struct timezone *)0) < 0)		return (-1);	if (t)		*t = tt.tv_sec;	return (tt.tv_sec);}

⌨️ 快捷键说明

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