summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2013-08-19 12:46:30 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2013-08-19 12:46:30 +0200
commitfa182455edbd89e9f33a4ba6aab8db72809973c1 (patch)
tree50879241bec1c56019170bae9b3ee7162f4e94eb
parent09d3c20c0dd97586f4978253a24327767a2a13e6 (diff)
clock.3: clock() switched from using times(2) to clock_gettime() in glibc 2.18
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/clock.313
1 files changed, 12 insertions, 1 deletions
diff --git a/man3/clock.3 b/man3/clock.3
index 4d85564b..8cab0111 100644
--- a/man3/clock.3
+++ b/man3/clock.3
@@ -26,7 +26,7 @@
.\" Modified 14 Jun 2002, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on differences from other UNIX systems with respect to
.\" waited-for children.
-.TH CLOCK 3 2008-08-28 "GNU" "Linux Programmer's Manual"
+.TH CLOCK 3 2013-08-19 "GNU" "Linux Programmer's Manual"
.SH NAME
clock \- determine processor time
.SH SYNOPSIS
@@ -83,6 +83,17 @@ The
.BR times (2)
function, which explicitly returns (separate) information about the
caller and its children, may be preferable.
+
+In glibc 2.17 and earlier,
+.BR clock ()
+was implemented on top of
+.BR times (2).
+For improved precision,
+since glibc 2.18, it is implemented on top of
+.BR clock_gettime (2)
+(using the
+.BR CLOCK_PROCESS_CPUTIME_ID
+clock).
.SH SEE ALSO
.BR clock_gettime (2),
.BR getrusage (2),