>> Needing to link with librt in order to access clock_gettime is an
>> unfortunate wart in glibc, but other C libraries exist out there
>> (heck, given the success of Android, glibc is certainly a minority
>> even if you limit yourself to Linux), and of those that provide
>> clock_gettime, most have it directly in libc and not in a separate
>> library.
>
> I think that has changed in GLIBC 2.17:
> http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD

good, having clock_gettime in the core library will certainly improve
the situation.

Still, for pre-2.17 versions of glibc or libraries which don't provide
clock_gettime, I think we should fix the discrepancy between nominal
resolution and actual precision of SYSTEM_CLOCK with int8 arguments.

I have provided two different patches in this direction, and I would
be very grateful for comments regarding which one would be preferable
(I now tend to prefer the second one), and what would be needed to
make it suitable for acceptance into trunk.

Cheers,
Janus

Reply via email to