source: trunk/minix/man/man2/times.2@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.6 KB
Line 
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)times.3c 6.1 (Berkeley) 5/9/85
6.\"
7.TH TIMES 2 "May 9, 1985"
8.UC 4
9.SH NAME
10times \- get process times
11.SH SYNOPSIS
12.nf
13.ft B
14#include <sys/types.h>
15#include <sys/times.h>
16#include <time.h>
17
18int times(struct tms *\fIbuffer\fP)
19.fi
20.SH DESCRIPTION
21.B Times
22returns time-accounting information
23for the current process
24and for the terminated child processes
25of the current process.
26All times are in 1/CLOCKS_PER_SEC seconds.
27.PP
28This is the structure returned by
29.BR times :
30.PP
31.RS
32.nf
33.ta +0.4i +0.8i +1.2i
34struct tms {
35 clock_t tms_utime; /* user time for this process */
36 clock_t tms_stime; /* system time for this process */
37 clock_t tms_cutime; /* children's user time */
38 clock_t tms_cstime; /* children's system time */
39};
40.fi
41.RE
42.PP
43The user time is the number of clock ticks used by a process on
44its own computations. The system time is the number of clock ticks
45spent inside the kernel on behalf of a process. This does not
46include time spent waiting for I/O to happen, only actual CPU
47instruction times.
48.PP
49The children times are the sum
50of the children's process times and
51their children's times.
52.SH RETURN
53.B Times
54returns 0 on success, otherwise \-1 with the error code stored into the
55global variable
56.BR errno .
57.SH ERRORS
58The following error code may be set in
59.BR errno :
60.TP 15
61[EFAULT]
62The address specified by the
63.I buffer
64parameter is not in a valid part of the process address space.
65.SH "SEE ALSO"
66.BR time (1),
67.BR wait (2),
68.BR time (2).
Note: See TracBrowser for help on using the repository browser.