[PATCH v2] time: Add TIME_MONOTONIC, TIME_ACTIVE, and TIME_THREAD_ACTIVE

Joseph Myers josmyers@redhat.com
Tue Nov 25 17:00:55 GMT 2025


On Tue, 25 Nov 2025, Florian Weimer wrote:

> * Adhemerval Zanella:
> 
> > The TIME_MONOTONIC maps to POSIX's CLOCK_MONOTONIC, TIME_ACTIVE to
> > CLOCK_PROCESS_CPUTIME_ID, and TIME_THREAD_ACTIVE to
> > CLOCK_THREAD_CPUTIME_ID.
> >
> > No Linux specific timer are added as extension.
> 
> I think we should come up with some general transformation of the clock
> ID values.  It would help us if WG14 lifted the requirement that clock
> IDs must be positive integers.  The interfaces they defined merely

I only see such a requirement for TIME_UTC and TIME_MONOTONIC, not for 
TIME_ACTIVE, TIME_THREAD_ACTIVE or any implementation-defined other time 
bases.

> Would someone in the ISO system please submit a DR?  I think for us,
> permitting negative values would work, as would making the clock base
> type unsigned.

The issue submission process is to email an issue report to me at 
c-issues@open-std.org as described at 
https://www.open-std.org/jtc1/sc22/wg14/issues/ (describing an issue 
present in C23; suggesting concrete wording changes can be helpful, though 
not required).

-- 
Joseph S. Myers
josmyers@redhat.com



More information about the Libc-alpha mailing list