1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH TIMES 3UCB "Oct 30, 2007"
.SH NAME
times \- get process times
.SH SYNOPSIS
.LP
.nf
\fB/usr/ucb/cc\fR [ \fIflag\fR ... ] \fIfile\fR ...
#include <sys/param.h>
#include <sys/types.h>
#include <sys/times.h>
\fBint\fR \fBtimes\fR(\fItmsp\fR)
\fIregister struct tms *\fR\fItmsp\fR;
.fi
.SH DESCRIPTION
.sp
.LP
The \fBtimes()\fR function returns time-accounting information for the current
process and for the terminated child processes of the current process. All
times are reported in clock ticks. The number of clock ticks per second is
defined by the variable \fBCLK_TCK\fR, found in the header \fB<limits.h>\fR.
.sp
.LP
A structure with the following members is returned by \fBtimes()\fR:
.sp
.in +2
.nf
time_t tms_utime; /* user time */
time_t tms_stime; /* system time */
time_t tms_cutime; /* user time, children */
time_t tms_cstime; /* system time, children */
.fi
.in -2
.sp
.LP
The children's times are the sum of the children's process times and their
children's times.
.SH RETURN VALUES
.sp
.LP
Upon successful completion, \fBtimes()\fR returns \fB0\fR. Otherwise, it
returns \fB\(mi1\fR\&.
.SH SEE ALSO
.sp
.LP
\fBtime\fR(1), \fBtime\fR(2), \fBgetrusage\fR(3C), \fBwait\fR(3C)
.SH NOTES
.sp
.LP
Use of these interfaces should be restricted to only applications written on
BSD platforms. Use of these interfaces with any of the system libraries or in
multi-threaded applications is unsupported.
.sp
.LP
The \fBtimes()\fR function has been superseded by \fBgetrusage\fR(3C).
|