#include <sys/types.h>
#include <sys/times.h>
/*--------------------------------------------------------------------*/
/*| C function to report Unix user-program execution time; */
/*| returns time from program start to call time in units of 1/60 sec */
/*| This works with Sun/Solaris. Not all Unix versions have the same */
/*| CPU time calls; check your local Unix manuals. */
/*| Author: Michael B. Feldman, The George Washington University */
/*| Last Modified: February 1996 */
/*--------------------------------------------------------------------*/
int unixtime() /* C function returning an integer value */
{
struct tms TimeReading; /* tms declared in sys/times.h */
times(&TimeReading); /* times declared in sys/times.h */
return(TimeReading.tms_utime); /* returning the user time field */
/* in 60ths of a second */
}