ack/lang/cem/libcc.ansi/sys/misc/clock.c

18 lines
248 B
C
Raw Normal View History

1989-06-12 15:22:14 +00:00
/*
* clock - determine the processor time used
*/
1994-06-24 14:02:31 +00:00
/* $Id$ */
1989-06-12 15:22:14 +00:00
2018-06-21 20:33:47 +00:00
#include <time.h>
#include <sys/times.h>
1989-06-12 15:22:14 +00:00
clock_t
clock(void)
{
1989-12-18 15:33:48 +00:00
struct tms tms;
times(&tms);
1989-12-18 15:33:48 +00:00
/* Assume that time_t can be converted to clock_t for Sys5 */
return tms.tms_utime;
1989-06-12 15:22:14 +00:00
}