1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* * clock - determine the processor time used */ #include <sys/cdefs.h> #include "namespace.h" #include <time.h> #include <sys/times.h> clock_t clock(void) { struct tms tms; times(&tms); return tms.tms_utime; }