xref: /plan9/sys/src/ape/lib/ap/gen/clock.c (revision 3e12c5d1bb89fc02707907988834ef147769ddaf)
1 #include <time.h>
2 #include <sys/times.h>
3 
4 clock_t
clock(void)5 clock(void)
6 {
7 	struct tms t;
8 
9 	if(times(&t) == (clock_t)-1)
10 		return (clock_t)-1;
11 	return t.tms_utime+t.tms_stime;
12 }
13