📄 time.c
字号:
/* Implementation of the TIME and TIME8 g77 intrinsics. Copyright (C) 2005 Free Software Foundation, Inc. Contributed by François-Xavier Coudert <coudert@clipper.ens.fr>This file is part of the GNU Fortran 95 runtime library (libgfortran).Libgfortran is free software; you can redistribute it and/ormodify it under the terms of the GNU General PublicLicense as published by the Free Software Foundation; eitherversion 2 of the License, or (at your option) any later version.In addition to the permissions in the GNU General Public License, theFree Software Foundation gives you unlimited permission to link thecompiled version of this file into combinations with other programs,and to distribute those combinations without any restriction comingfrom the use of this file. (The General Public License restrictionsdo apply in other respects; for example, they cover modification ofthe file, and distribution when not linked into a combineexecutable.)Libgfortran is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General PublicLicense along with libgfortran; see the file COPYING. If not,write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA 02110-1301, USA. */#include "config.h"#include "libgfortran.h"#ifdef TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# if HAVE_SYS_TIME_H# include <sys/time.h># else# ifdef HAVE_TIME_H# include <time.h># endif# endif#endif#include "../io/io.h"/* INTEGER(KIND=4) FUNCTION TIME() */#ifdef HAVE_TIMEextern GFC_INTEGER_4 time_func (void);export_proto(time_func);GFC_INTEGER_4time_func (void){ return (GFC_INTEGER_4) time (NULL);}/* INTEGER(KIND=8) FUNCTION TIME8() */extern GFC_INTEGER_8 time8_func (void);export_proto(time8_func);GFC_INTEGER_8time8_func (void){ return (GFC_INTEGER_8) time (NULL);}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -