xref: /minix3/minix/lib/libc/gen/clock.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /*
2*433d6423SLionel Sambuc  * clock - determine the processor time used
3*433d6423SLionel Sambuc  */
4*433d6423SLionel Sambuc #include <sys/cdefs.h>
5*433d6423SLionel Sambuc #include "namespace.h"
6*433d6423SLionel Sambuc 
7*433d6423SLionel Sambuc #include <time.h>
8*433d6423SLionel Sambuc #include <sys/times.h>
9*433d6423SLionel Sambuc 
clock(void)10*433d6423SLionel Sambuc clock_t clock(void)
11*433d6423SLionel Sambuc {
12*433d6423SLionel Sambuc 	struct tms tms;
13*433d6423SLionel Sambuc 
14*433d6423SLionel Sambuc 	times(&tms);
15*433d6423SLionel Sambuc 	return tms.tms_utime;
16*433d6423SLionel Sambuc }
17