public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: gyrovorbis@gmail.com
Cc: Newlib <newlib@sourceware.org>
Subject: Re: C11 timespec_get(), TIME_UTC
Date: Sat, 25 Mar 2023 16:21:31 -0500	[thread overview]
Message-ID: <CAF9ehCXWxxTX1dsKFEBwKB5EZuJRVrJYEToESk__woOfG9n7xw@mail.gmail.com> (raw)
In-Reply-To: <CAB4=puLVf1WMraT9OpgvHyTnkCZJpovHE=Qy2ONn+OskO+FX5g@mail.gmail.com>

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

On Sat, Mar 25, 2023, 4:00 PM Falco Girgis <gyrovorbis@gmail.com> wrote:

> Hey guys,
>
> I'm a big user and fan of Newlib and have really enjoyed working with it.
> In addition to it being used in a bunch of the builds I target in CI, I'm
> one of the maintainers of the KallistiOS indie/homebrew SDK for the Sega
> Dreamcast, which has an epic amount of modern language and stdlib support
> for C and C++ thanks to you guys.
>
> Anyway, I just encountered something today that is missing that I can't
> help but feel like should really be included within the lib: support for
> the C11 timespec struct, timespec_get() function, and the TIME_UTC macro,
> used to simply get the current UTC time in seconds + nanoseconds:
> https://en.cppreference.com/w/c/chrono/TIME_UTC
>
> Given the amount of non-standard POSIX time functionality that is
> supported, the modern C++ chrono stuff, the rest of the C stdlib, etc, it
> feels like this should fall within the scope of the project. It looks like
> everybody else is just doing a tiny little wrapper for it around
> clock_gettime(), so it's simple to implement as well... I also see several
> threads on stack overflow with people confused as to why it's not available
> to them, so I'm not the only one interested.
>
> I've never submitted a patch for anything like this before and wanted to
> run this by you guys to make sure it fall within NewLib's scope before I
> was going to give it a shot. What do you guys think?
>

I will go the explanation that hi one had ever wanted it enough to
implement it. :)

Sure feel free to implement and submit it with the proper license.

>
> Anyway, thanks again, sorry for the verbosity.
>

      reply	other threads:[~2023-03-25 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25 20:59 Falco Girgis
2023-03-25 21:21 ` Joel Sherrill [this message]

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=CAF9ehCXWxxTX1dsKFEBwKB5EZuJRVrJYEToESk__woOfG9n7xw@mail.gmail.com \
    --to=joel@rtems.org \
    --cc=gyrovorbis@gmail.com \
    --cc=newlib@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).