From nobody Fri Jul 8 19:58:08 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9EDE03E0049; Fri, 8 Jul 2022 19:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lfkbh48QFz3Wl1; Fri, 8 Jul 2022 19:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657310288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rolQnC6pvFCpcjX+qzVyxvd6DhAi7XSChqyyFehvg2k=; b=EUQdRJg6K7uWIappd21dMelDLP8d+utAqi9NNeayUk36jrzP0aEhjDaoOApL2auUKss8+1 yOwz1Qp4YPXASSLhADmpQpMTGQauJWFbUPXx7k47y0QmK/vCo/HERJWWS4uyUqLm06mnUU Kf+cLA6dJv+7WPsjf3mzAqGQWqMqiOcjj5BasXxgt1yNzaPjO6HBt+3AqZdMo5vo9ld0ej mdHBz3kkfFUSvWxDaYs1b8jbCprTXlnyXyZWliQJEc7+Tfy6b9xm4SzVDNMqiwXeyGGY6c iI3GL9P+zM+A3nL3U7QGdm8KneZGwo2Yo9HepBeFEINlxG+RxVp80hik1+U/7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lfkbh3F5kzK41; Fri, 8 Jul 2022 19:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 268Jw8E8045937; Fri, 8 Jul 2022 19:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 268Jw81G045936; Fri, 8 Jul 2022 19:58:08 GMT (envelope-from git) Date: Fri, 8 Jul 2022 19:58:08 GMT Message-Id: <202207081958.268Jw81G045936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 16e4487e5f82 - main - clock_gettime.2: Clarify CLOCK_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16e4487e5f82e1ff501fe5af6afbfbd0435a1cbf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657310288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rolQnC6pvFCpcjX+qzVyxvd6DhAi7XSChqyyFehvg2k=; b=tsSnDsENsFsb+/hKP6YAnA6GWUd8Oij/jP5ZPsnKIWLxtsY4i0qllFe4EJbRlVq9CEoaox FL4ZHRUQ49BZiMLRQARPTn/IO5MLKcE4pVY6KViFKysHbGBfTMdoDNgjUa7NQaJSiFoOPL w+mMesEDGAVwzTGaI0KP9ElV7by7+0sVJCvQWyBpGqgRGBG4ldgSMcBebHFVG24bzl5/jw 20aB6DZXnw/ZDm3vfCT7Ln3MnfO9qXgY5eqnYWpMuwKUD1OU02D6hjW74gKDTXrvoNovzg 8ZmRjt8K9NOeEzo1zMk+YV4rUtgDoQJAScmJRlhhZklOo2B5qn4Lk7UFldP/lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657310288; a=rsa-sha256; cv=none; b=CqoHskdJR9N6V5SDf9n09hJIP17/7z7b+aprCGPcG1668kbTQist80AXIIWcNBgQBIQF0k dd3xe96NZw/tgqXNsnfYIF5d4JQ/xasAm5MMrYWJb0eZ00shjXazwsMHg4GOy8qs9jTXrp ITgdyi5e2h1zNuAdj/25+alj1EwMObGGsjaXC8vTjYLleYo/V08WEqKOpa9fnTdi7jyhfu Fq/6X9UQM1OrtrLZzva1n/Qc499kOzFLeCMVWMCNghQlkbv7c5eNmJj0YSxgrl1NkT6dp3 eMEFUgqUiF68SvFHIc+lGW6JmPK/gT2vv1O3e4+Xe5U5m/KugofIWhgeCk+fbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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.