This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)


On Sun, Dec 2, 2012 at 4:46 PM, Tobias Burnus <burnus@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


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