summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorvangyzen <vangyzen@FreeBSD.org>2017-03-25 00:52:33 +0000
committervangyzen <vangyzen@FreeBSD.org>2017-03-25 00:52:33 +0000
commit417388477be7dae7a2b7b03337e9e8beb5b0f8b8 (patch)
tree3919c747746d248fde516748d99efa52ae3e0ee5 /lib
parent59a1e89fdd6c1f744428316867913e718618a1e5 (diff)
downloadFreeBSD-src-417388477be7dae7a2b7b03337e9e8beb5b0f8b8.zip
FreeBSD-src-417388477be7dae7a2b7b03337e9e8beb5b0f8b8.tar.gz
MFC r315694
clock_gettime.2: add some clock IDs Add the CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID clock_id values to the clock_gettime(2) man page. Reformat the excessively long paragraph (sentence!) into a tag list. Sponsored by: Dell EMC
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/clock_gettime.262
1 files changed, 36 insertions, 26 deletions
diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2
index e77b1e8..fbd3a91 100644
--- a/lib/libc/sys/clock_gettime.2
+++ b/lib/libc/sys/clock_gettime.2
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 27, 2015
+.Dd March 20, 2017
.Dt CLOCK_GETTIME 2
.Os
.Sh NAME
@@ -58,31 +58,39 @@ used by a clock which is specified by
.Pp
The
.Fa clock_id
-argument
-can be one of the following values:
-.Dv CLOCK_REALTIME ,
-.Dv CLOCK_REALTIME_PRECISE ,
-.Dv CLOCK_REALTIME_FAST
-for time that increments as
-a wall clock should;
-.Dv CLOCK_MONOTONIC ,
-.Dv CLOCK_MONOTONIC_PRECISE ,
-.Dv CLOCK_MONOTONIC_FAST
-which increments in SI seconds;
-.Dv CLOCK_UPTIME ,
-.Dv CLOCK_UPTIME_PRECISE ,
-.Dv CLOCK_UPTIME_FAST
-which starts at zero when the kernel boots and increments
-monotonically in SI seconds while the machine is running;
-.Dv CLOCK_VIRTUAL
-for time that increments only when
-the CPU is running in user mode on behalf of the calling process;
-.Dv CLOCK_PROF
-for time that increments when the CPU is running in user or
-kernel mode; or
-.Dv CLOCK_SECOND
-which returns the current second without performing a full time counter
-query, using in-kernel cached value of current second.
+argument can be a value obtained from
+.Xr clock_getcpuclockid 3
+or
+.Xr pthread_getcpuclockid 3
+as well as the following values:
+.Pp
+.Bl -tag -width indent -compact
+.It Dv CLOCK_REALTIME
+.It Dv CLOCK_REALTIME_PRECISE
+.It Dv CLOCK_REALTIME_FAST
+Increments as a wall clock should.
+.It Dv CLOCK_MONOTONIC
+.It Dv CLOCK_MONOTONIC_PRECISE
+.It Dv CLOCK_MONOTONIC_FAST
+Increments in SI seconds.
+.It Dv CLOCK_UPTIME
+.It Dv CLOCK_UPTIME_PRECISE
+.It Dv CLOCK_UPTIME_FAST
+Starts at zero when the kernel boots and increments
+monotonically in SI seconds while the machine is running.
+.It Dv CLOCK_VIRTUAL
+Increments only when
+the CPU is running in user mode on behalf of the calling process.
+.It Dv CLOCK_PROF
+Increments when the CPU is running in user or kernel mode.
+.It Dv CLOCK_SECOND
+Returns the current second without performing a full time counter
+query, using an in-kernel cached value of the current second.
+.It Dv CLOCK_PROCESS_CPUTIME_ID
+Returns the execution time of the calling process.
+.It Dv CLOCK_THREAD_CPUTIME_ID
+Returns the execution time of the calling thread.
+.El
.Pp
The clock IDs
.Fa CLOCK_REALTIME_FAST ,
@@ -144,7 +152,9 @@ A user other than the super-user attempted to set the time.
.Sh SEE ALSO
.Xr date 1 ,
.Xr adjtime 2 ,
+.Xr clock_getcpuclockid 3 ,
.Xr ctime 3 ,
+.Xr pthread_getcpuclockid 3 ,
.Xr timed 8
.Sh STANDARDS
The
OpenPOWER on IntegriCloud