OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man2 / times.2
index a060cb9..8228da6 100644 (file)
@@ -1,7 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -21,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" Modified by Michael Haardt (michael@moria.de)
 .\" Modified Sat Jul 24 14:29:17 1993 by Rik Faith (faith@cs.unc.edu)
@@ -35,7 +35,7 @@
 .\"    Added notes on nonstandard behavior: Linux allows 'buf' to
 .\"    be NULL, but POSIX.1 doesn't specify this and it's nonportable.
 .\"
-.TH TIMES 2 2008-06-25 "Linux" "Linux Programmer's Manual"
+.TH TIMES 2 2012-10-22 "Linux" "Linux Programmer's Manual"
 .SH NAME
 times \- get process times
 .SH SYNOPSIS
@@ -98,7 +98,7 @@ In particular, times of grandchildren
 that the children did not wait for are never seen.
 .LP
 All times reported are in clock ticks.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 .BR times ()
 returns the number of clock ticks that have elapsed since
 an arbitrary point in the past.
@@ -107,8 +107,12 @@ The return value may overflow the possible range of type
 On error, \fI(clock_t)\ \-1\fP is returned, and
 .I errno
 is set appropriately.
-.\" The only possible error is EFAULT.
-.SH "CONFORMING TO"
+.SH ERRORS
+.TP
+.B EFAULT
+.I tms
+points outside the process's address space.
+.SH CONFORMING TO
 SVr4, 4.3BSD, POSIX.1-2001.
 .SH NOTES
 The number of clock ticks per second can be obtained using:
@@ -132,8 +136,8 @@ are automatically included in the
 .I tms_cstime
 and
 .I tms_cutime
-fields, although POSIX.1-2001 says that this should only happen
-if the calling process
+fields, although POSIX.1-2001 says that this should happen
+only if the calling process
 .BR wait (2)s
 on its children.
 This nonconformance is rectified in Linux 2.6.9 and later.
@@ -170,12 +174,12 @@ combined with the fact that the returned value may overflow the range of
 .IR clock_t ,
 means that a portable application would be wise to avoid using this value.
 To measure changes in elapsed time, use
-.BR gettimeofday (2)
+.BR clock_gettime (2)
 instead.
 .\" .PP
 .\" On older systems the number of clock ticks per second is given
 .\" by the variable HZ.
-.SS "Historical"
+.SS Historical
 SVr1-3 returns
 .I long
 and the struct members are of type
@@ -194,17 +198,25 @@ A limitation of the Linux system call conventions on some architectures
 can return \-1, falsely indicating that an error occurred.
 The same problem can occur when the return value wraps passed
 the maximum value that can be stored in
-.BR clockid_t .
+.BR clock_t .
 .\" The problem is that a syscall return of -4095 to -1
 .\" is interpreted by glibc as an error, and the wrapper converts
 .\" the return value to -1.
 .\" http://marc.info/?l=linux-kernel&m=119447727031225&w=2
 .\" "compat_sys_times() bogus until jiffies >= 0"
 .\" November 2007
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR time (1),
 .BR getrusage (2),
 .BR wait (2),
 .BR clock (3),
 .BR sysconf (3),
 .BR time (7)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.