public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Mark Harris <mark.hsj@gmail.com>
Cc: linux-man@vger.kernel.org,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH v3 2/2] man/man3/timespec_get.3: Add ISO C23 time bases
Date: Wed, 11 Feb 2026 00:01:49 +0100	[thread overview]
Message-ID: <aYu3tjoB57cJHBxe@devuan> (raw)
In-Reply-To: <1955d9507d6ab4e482f92a4d7717872c98f39f8a.1769705123.git.mark.hsj@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3086 bytes --]

Hi Mark,

On 2026-01-29T08:52:24-0800, Mark Harris wrote:
> Document new time bases TIME_MONOTONIC, TIME_ACTIVE, and
> TIME_THREAD_ACTIVE, introduced in ISO C23 and supported by
> glibc 2.43.[1]
> 
> [1] <https://sourceware.org/git/?p=glibc.git;a=commit;h=f28a11e43f40>
> 
> Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Thanks!  I've applied the patch.

> ---
> v3: Use .TQ for time bases in STANDARDS and HISTORY
> v2: Split into two patches, add time bases to History section
> 
>  man/man3/timespec_get.3 | 49 ++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man3/timespec_get.3 b/man/man3/timespec_get.3
> index 67da4858c..4f0fe1a96 100644
> --- a/man/man3/timespec_get.3
> +++ b/man/man3/timespec_get.3
> @@ -29,7 +29,10 @@ .SH SYNOPSIS
>      _ISOC11_SOURCE
>  .fi
>  .P
> -.BR timespec_getres ():
> +.BR timespec_getres (),
> +.BR TIME_MONOTONIC ,
> +.BR TIME_ACTIVE ,
> +.BR TIME_THREAD_ACTIVE :
>  .nf
>      _ISOC23_SOURCE
>  .fi
> @@ -67,6 +70,37 @@ .SH DESCRIPTION
>  and
>  .IR clock_getres(CLOCK_REALTIME,\~tp) ,
>  respectively.
> +.TP
> +.BR TIME_MONOTONIC " (since glibc 2.43)"

I've removed the "(since..." part, as it's redundant with HISTORY, and
I prefer the HISTORY section.


Have a lovely night!
Alex

> +A time base that measures time since an unspecified point in the past,
> +where the time within a process will not decrease even if the
> +system's real time clock is set or adjusted.
> +The time and resolution in this time base
> +are the same as those retrieved by
> +.I clock_gettime(CLOCK_MONOTONIC,\~res)
> +and
> +.IR clock_getres(CLOCK_MONOTONIC,\~tp) ,
> +respectively.
> +.TP
> +.BR TIME_ACTIVE " (since glibc 2.43)"
> +A process-specific time base that measures CPU time consumed by
> +the calling process.
> +The time and resolution in this time base
> +are the same as those retrieved by
> +.I clock_gettime(CLOCK_PROCESS_CPUTIME_ID,\~res)
> +and
> +.IR clock_getres(CLOCK_PROCESS_CPUTIME_ID,\~tp) ,
> +respectively.
> +.TP
> +.BR TIME_THREAD_ACTIVE " (since glibc 2.43)"
> +A thread-specific time base that measures CPU time consumed by
> +the calling thread.
> +The time and resolution in this time base
> +are the same as those retrieved by
> +.I clock_gettime(CLOCK_THREAD_CPUTIME_ID,\~res)
> +and
> +.IR clock_getres(CLOCK_THREAD_CPUTIME_ID,\~tp) ,
> +respectively.
>  .SH RETURN VALUE
>  .BR timespec_get ()
>  returns the nonzero
> @@ -103,6 +137,12 @@ .SH STANDARDS
>  POSIX.1-2024.
>  .TP
>  .BR timespec_getres ()
> +.TQ
> +.B TIME_MONOTONIC
> +.TQ
> +.B TIME_ACTIVE
> +.TQ
> +.B TIME_THREAD_ACTIVE
>  C23.
>  .SH HISTORY
>  .TP
> @@ -113,6 +153,13 @@ .SH HISTORY
>  .TP
>  .BR timespec_getres ()
>  C23, glibc 2.34.
> +.TP
> +.B TIME_MONOTONIC
> +.TQ
> +.B TIME_ACTIVE
> +.TQ
> +.B TIME_THREAD_ACTIVE
> +C23, glibc 2.43.
>  .SH SEE ALSO
>  .BR clock_gettime (2),
>  .BR clock_getres (2)
> -- 
> 2.52.0
> 
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-02-10 23:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28  6:42 [PATCH] man/man3/timespec_get.3: Add ISO C23 time bases Mark Harris
2026-01-28 14:57 ` Alejandro Colomar
2026-01-28 17:35   ` Mark Harris
2026-01-28 17:33 ` [PATCH v2 1/2] man/man3/timespec_get.3: Refactor to prepare for new " Mark Harris
2026-01-28 17:33   ` [PATCH v2 2/2] man/man3/timespec_get.3: Add ISO C23 " Mark Harris
2026-01-29 15:28   ` [PATCH v2 1/2] man/man3/timespec_get.3: Refactor to prepare for new " Alejandro Colomar
2026-01-29 16:58     ` Mark Harris
2026-01-29 16:52 ` [PATCH v3 " Mark Harris
2026-01-29 16:52   ` [PATCH v3 2/2] man/man3/timespec_get.3: Add ISO C23 " Mark Harris
2026-02-10 23:01     ` Alejandro Colomar [this message]
2026-02-10 22:53   ` [PATCH v3 1/2] man/man3/timespec_get.3: Refactor to prepare for new " Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYu3tjoB57cJHBxe@devuan \
    --to=alx@kernel.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mark.hsj@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox