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: [PATCH v2.2][BZ #12515] Improve precision of clock function


> We could do this by using gnulib's verify.h and then putting this into clock.c:
> 
>    #include <verify.h>
>    verify (1000000000 % CLOCKS_PER_SEC == 0);
> 
> Or if we'd rather not use gnulib's verify.h we could approximate
> its implementation of 'verify'; something like this:

It's a trivial macro, so:

#if CLOCKS_PER_SEC != 1000000
# error blah blah
#endif

is adequate.


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