1 Star 0 Fork 0

lindorx / stream2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mysecond.c 745 Bytes
一键复制 编辑 原始数据 按行查看 历史
代凡 提交于 2021-03-04 17:09 . 完成初步改写,尚未实现openmp。
/* A gettimeofday routine to give access to the wall
* clock timer on most UNIX-like systems.
*
* This version defines two entry points -- with
* and without appended underscores, so it *should*
* automagically link with FORTRAN */
#include <sys/time.h>
double mysecond()
{
/* struct timeval { long tv_sec;
* long tv_usec; };
*
* struct timezone { int tz_minuteswest;
* int tz_dsttime; }; */
struct timeval tp;
struct timezone tzp;
int i;
i = gettimeofday(&tp,&tzp);
return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
}
double mysecond_() {return mysecond();}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/lindorx/stream2.git
git@gitee.com:lindorx/stream2.git
lindorx
stream2
stream2
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891