svn commit: r315694 - head/lib/libc/sys

Eric van Gyzen vangyzen at FreeBSD.org
Wed Mar 22 00:50:38 UTC 2017


Author: vangyzen
Date: Wed Mar 22 00:50:36 2017
New Revision: 315694
URL: https://svnweb.freebsd.org/changeset/base/315694

Log:
  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.
  
  Reported by:	jilles in https://reviews.freebsd.org/D10020
  MFC after:	3 days
  Sponsored by:	Dell EMC

Modified:
  head/lib/libc/sys/clock_gettime.2

Modified: head/lib/libc/sys/clock_gettime.2
==============================================================================
--- head/lib/libc/sys/clock_gettime.2	Tue Mar 21 22:41:37 2017	(r315693)
+++ head/lib/libc/sys/clock_gettime.2	Wed Mar 22 00:50:36 2017	(r315694)
@@ -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 attempt
 .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


More information about the svn-src-head mailing list