Date: Wed, 22 Mar 2017 00:50:37 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315694 - head/lib/libc/sys Message-ID: <201703220050.v2M0ob0p012506@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703220050.v2M0ob0p012506>