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>
|
2018-06-23 13:57:57 +00:00
|
|
|
#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;
|
|
|
|
|
2018-06-23 13:57:57 +00:00
|
|
|
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
|
|
|
}
|