xref: /plan9/sys/src/ape/lib/ap/gen/clock.c (revision 58da3067adcdccaaa043d0bfde28ba83b7ced07d)
1 #include <time.h>
2 #include <sys/times.h>
3 
4 clock_t
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