mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
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
This commit is contained in:
parent
5abb3b74d3
commit
16fe28bb9f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315694
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user