Date: Fri, 8 Jul 2022 19:58:08 GMT From: Mateusz Piotrowski <0mp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 16e4487e5f82 - main - clock_gettime.2: Clarify CLOCK_* Message-ID: <202207081958.268Jw81G045936@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=16e4487e5f82e1ff501fe5af6afbfbd0435a1cbf commit 16e4487e5f82e1ff501fe5af6afbfbd0435a1cbf Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-08 19:54:10 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-07-08 19:57:24 +0000 clock_gettime.2: Clarify CLOCK_* Clarify that CLOCK_* (e.g., CLOCK_REALTIME) do not necessarily default to CLOCK_*_FAST. PR: 259642 --- lib/libc/sys/clock_gettime.2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2 index b04732fc993e..21526a98bd40 100644 --- a/lib/libc/sys/clock_gettime.2 +++ b/lib/libc/sys/clock_gettime.2 @@ -96,19 +96,28 @@ Returns the execution time of the calling thread. .El .Pp The clock IDs +.Fa CLOCK_REALTIME , +.Fa CLOCK_MONOTONIC , +and +.Fa CLOCK_UPTIME +perform a full time counter query. +The clock IDs with the _FAST suffix, i.e., .Fa CLOCK_REALTIME_FAST , .Fa CLOCK_MONOTONIC_FAST , -.Fa CLOCK_UPTIME_FAST -are analogs of corresponding IDs without _FAST suffix but do not perform +and +.Fa CLOCK_UPTIME_FAST , +do not perform a full time counter query, so their accuracy is one timer tick. Similarly, .Fa CLOCK_REALTIME_PRECISE , .Fa CLOCK_MONOTONIC_PRECISE , +and .Fa CLOCK_UPTIME_PRECISE are used to get the most exact value as possible, at the expense of execution time. The clock IDs -.Fa CLOCK_REALTIME_COARSE , +.Fa CLOCK_REALTIME_COARSE +and .Fa CLOCK_MONOTONIC_COARSE are aliases of corresponding IDs with _FAST suffix for compatibility with other systems.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207081958.268Jw81G045936>