TIMES(3C) — UNIX Programmer’s Manual
NAME
times − get process times
SYNOPSIS
#include <sys/types.h>
#include <sys/times.h>
times(buffer)
struct tms ∗buffer;
DESCRIPTION
This interface is obsoleted by getrusage(2).
Times returns time-accounting information for the current process and for the terminated child processes of the current process. All times are in centi-seconds.
This is the structure returned by times:
/∗
∗ $Header: /smsa/bsd:include/sys/times.h:bsd 1.8 $
∗ $Source: /smsa/bsd:include/sys/times.h: $
∗
∗ Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
∗
∗/
/∗
∗ Copyright (c) 1982, 1986 Regents of the University of California.
∗ All rights reserved. The Berkeley software License Agreement
∗ specifies the terms and conditions for redistribution.
∗
∗@(#)times.h7.1 (Berkeley) 6/4/86
∗/
#ifndef__sys_times_h
#define__sys_times_h
#ifndef __clock_t
#define __clock_t 1
typedef unsigned int clock_t; /∗ cpu time type - units of CLK_TCK or CLOCKS_PER_SEC ∗/
#endif
/∗
∗ Structure returned by times()
∗/
struct tms {
clock_ttms_utime;/∗ user time ∗/
clock_ttms_stime;/∗ system time ∗/
clock_ttms_cutime;/∗ user time, children ∗/
clock_ttms_cstime;/∗ system time, children ∗/
};
#ifndef_KERNEL
extern clock_t times (struct tms ∗ /∗buffer∗/);
#endif
#endif/∗__sys_times_h∗/
/∗ EOF times.h ∗/
The children times are the sum of the children’s process times and their children’s times.
SEE ALSO
time(1), getrusage(2), wait3(2), time(3)
4th Berkeley Distribution — Revision 1.3 of 12/12/88