/***************************************************************************** * FILE: timing_fgettod.c * DESCRIPTION: * Called by fortran example codes to obtain * seconds and microseconds from gettimeofday. Receives address * of times[2] and assigns values from timeval structure defined * by include file sys/time.h. Fortran receives values back by * reference. * AUTHOR: Blaise Barney * LAST REVISED: 6/11/96 Blaise Barney *****************************************************************************/ #include #include void timing_fgettod (int times[2]) { struct timeval tv; gettimeofday(&tv, (struct timeval*)0); times[0] = tv.tv_sec; times[1] = tv.tv_usec; }