From: Josh Triplett <josh@freedesktop.org>
To: Damien Lespiau <damien.lespiau@gmail.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH] __DATE__ & __TIME expansion
Date: Sun, 20 May 2007 15:52:10 -0700 [thread overview]
Message-ID: <4650D11A.8020706@freedesktop.org> (raw)
In-Reply-To: <11796983861111-git-send-email-damien.lespiau@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
Damien Lespiau wrote:
> Makes __DATE__expand to a character string literal of
> the form "Mmm dd yyyy" where the names of the months
> are the same as those generated by the asctime function,
> and the first character of dd is a space character if the
> value is less than 10.
> Makes __TIME__ expand to a a character string literal of
> the form "hh:mm:ss" as in the time generated by the
> asctime function.
Thanks for this patch. I think I'd prefer to avoid calling time more than
once per run of the program. __DATE__ and __TIME__ seem sufficiently rare
(ideally at most once each per project anyway) that avoiding repeated calls to
strftime probably doesn't matter; however, avoiding repeated calls to time
seems useful, even if it only avoids the one extra call when you use __DATE__
and __TIME__ once each.
Could you make the time_t static and only call time once?
Thanks,
Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next prev parent reply other threads:[~2007-05-20 22:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-20 21:59 [PATCH] Beautify all & install Makefile targets Damien Lespiau
2007-05-20 21:59 ` [PATCH] __DATE__ & __TIME expansion Damien Lespiau
2007-05-20 22:50 ` Neil Booth
2007-05-20 23:02 ` Josh Triplett
2007-05-20 23:49 ` Damien Lespiau
2007-05-21 0:06 ` Derek M Jones
2007-05-20 22:52 ` Josh Triplett [this message]
2007-05-21 0:35 ` [PATCH] Beautify all & install Makefile targets Josh Triplett
2007-05-22 18:28 ` Damien Lespiau
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=4650D11A.8020706@freedesktop.org \
--to=josh@freedesktop.org \
--cc=damien.lespiau@gmail.com \
--cc=linux-sparse@vger.kernel.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 NNTP newsgroup(s).