From owner-svn-src-head@freebsd.org Wed Mar 22 00:50:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A726D1640C; Wed, 22 Mar 2017 00:50:38 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1F531B06; Wed, 22 Mar 2017 00:50:37 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2M0obsg012507; Wed, 22 Mar 2017 00:50:37 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2M0ob0p012506; Wed, 22 Mar 2017 00:50:37 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201703220050.v2M0ob0p012506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 22 Mar 2017 00:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315694 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 00:50:38 -0000 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