summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/gen/clock.c
blob: d7d5d4b671a20daff9d70dd8603a18cc8b575545 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <time.h>
#include <sys/times.h>

clock_t
clock(void)
{
	struct tms t;

	if(times(&t) == (clock_t)-1)
		return (clock_t)-1;
	return t.tms_utime+t.tms_stime;
}