Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61090827
second.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 4, 11:45
Size
630 B
Mime Type
text/x-c
Expires
Mon, May 6, 11:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17368468
Attached To
rCGPHPC CG-PHPC
second.c
View Options
/* A Fortran-callable gettimeofday routine to give access
to the wall clock timer.
This subroutine may need to be modified slightly to get
it to link with Fortran on your computer.
*/
#include <sys/time.h>
/* int gettimeofday(struct timeval *tp, struct timezone *tzp); */
double second()
{
/* struct timeval { long tv_sec;
long tv_usec; };
struct timezone { int tz_minuteswest;
int tz_dsttime; }; */
struct timeval tp;
struct timezone tzp;
gettimeofday(&tp,&tzp);
return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
}
Event Timeline
Log In to Comment