On Sun, Dec 2, 2012 at 4:46 PM, Tobias Burnus <bur...@net-b.de> wrote:
> Janne Blomqvist wrote:
>>
>> 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

Ah, nice! That means we can look forward to 1 ns resolution on Linux
systems regardless of whether librt is linked or not; the code is
there already in order to support other systems where clock_* is
already in libc, so all that is required is a recompile against a
newer glibc. As an aside, the reason why we don't unconditionally link
in librt is exactly that explained in the link.


-- 
Janne Blomqvist

Reply via email to