6 #ifdef IBM_WATC /* IBM Waterloo-C compiler (same as bsd 4.2) */
12 #include <sys/types.h>
14 #include <sys/resource.h>
17 #if defined(UNIX60) || defined(UNIX100) || defined(__CYGWIN32__)
18 #include <sys/types.h>
19 #include <sys/times.h>
22 #ifdef vms /* VAX/C compiler -- times() with 100 HZ clock */
30 * util_cpu_time -- return a long which represents the elapsed processor
31 * time in milliseconds since some constant reference
40 (void) getrusage(RUSAGE_SELF
, &rusage
);
41 t
= (long) rusage
.ru_utime
.tv_sec
*1000 + rusage
.ru_utime
.tv_usec
/1000;
50 #ifdef UNIX60 /* times() with 60 Hz resolution */
53 t
= buffer
.tms_utime
* 16.6667;
57 struct tms buffer
; /* times() with 100 Hz resolution */
59 t
= buffer
.tms_utime
* 10;
63 /* Works under Windows NT but not Windows 95. */
64 struct tms buffer
; /* times() with 1000 Hz resolution */
70 tbuffer_t buffer
; /* times() with 100 Hz resolution */
72 t
= buffer
.proc_user_time
* 10;