14 #include <sys/resource.h>
36 #ifdef TIME_WITH_SYS_TIME
38 # ifdef HAVE_SYS_TIME_H
39 # include <sys/time.h>
42 # ifdef HAVE_SYS_TIME_H
43 # include <sys/time.h>
49 #ifdef HAVE_SYS_TIMES_H
50 #include <sys/times.h>
71 getrusage(RUSAGE_SELF,&
t_rec);
73 +
t_rec.ru_stime.tv_sec*1000000+
t_rec.ru_stime.tv_usec
75 getrusage(RUSAGE_CHILDREN,&
t_rec);
77 +
t_rec.ru_stime.tv_sec*1000000+
t_rec.ru_stime.tv_usec
79 return (
int)time(
NULL);
84 getrusage(RUSAGE_SELF,&
t_rec);
88 getrusage(RUSAGE_CHILDREN,&
t_rec);
100 getrusage(RUSAGE_SELF,&
t_rec);
104 getrusage(RUSAGE_CHILDREN,&
t_rec);
117 #ifdef EXTEND_TIMER_D
124 getrusage(RUSAGE_SELF,&
t_rec);
128 getrusage(RUSAGE_CHILDREN,&
t_rec);
136 #ifdef EXTEND_TIMER_D
140 Print(
"//%s %.2f sec\n" ,
v ,
f);
151 static struct timezone
tzp;
160 #ifdef HAVE_GETTIMEOFDAY
176 gettimeofday(&now, &
tzp);
178 if (
startRl.tv_usec > now.tv_usec)
180 now.tv_usec += 1000000;
199 gettimeofday(&now, &
tzp);
203 now.tv_usec += 1000000;
212 Print(
"//%s %.2f sec \n" ,
v ,
f);