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: signature.asc
Description: OpenPGP digital signature

Reply via email to