This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struct timespec normalization


Hi!

On Mon, 6 Feb 2012 09:50:05 -0800, Roland McGrath <roland@hack.frob.com> wrote:
> This suggests we'd benefit from a common inline function to do that.

For referene, ``that'' is the following idiom:

| -	  if (wakeup_time.tv_nsec > 1000000000)
| +	  if (wakeup_time.tv_nsec >= 1000000000)
|             {
|               wakeup_time.tv_nsec -= 1000000000;
|               ++wakeup_time.tv_sec;
|             }

Would ``that'' go into time/time.h, to find its place in
/usr/include/time.h, guarded by __USE_GNU (like TIMEVAL_TO_TIMESPEC in
time/sys/time.h, for example) -- that is, for general consumption and
benefit?  Or should it be only an internal thing, thus go into
include/time.h, avoiding us to have to think about versioning and all
that?


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]