This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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, libfortran] PR 47571 Some janitorial cleanup


On Wed, Feb 2, 2011 at 21:41, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> On Wed, Feb 02, 2011 at 09:23:15PM +0200, Janne Blomqvist wrote:
>>
>> I reviewed the Gfortran time intrinsics, both standard and extensions,
>> and AFAIK the only place where a monotonic clock fits the API, and
>> where we can expose high resolution, is the SYSTEM_CLOCK intrinsic.
>>
>
> I suppose that there is some subtle reason that I do not
> see. ÂBut, why should cpu_time() lack high resolution
> if it is available?

Sorry, I meant the various wallclock time intrinsics. And with "high
resolution", I was thinking of clock_gettime() (ns resolution) vs.
gettimeofday() (us resolution).

cpu_time() does indeed allow high resolution process CPU usage timing,
on POSIX targets we use getrusage() (if available) which allows us
resolution. Although at least on Linux the practical resolution is at
the granularity of the timer interrupt which depending on kernel
compile options is somewhere between 1 and 10 ms.

-- 
Janne Blomqvist


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