------- Comment #9 from sgk at troutmask dot apl dot washington dot edu 2007-12-20 22:27 ------- Subject: Re: DTIME returns total process time and not since last invocation
On Thu, Dec 20, 2007 at 09:39:29PM -0000, dfranke at gcc dot gnu dot org wrote: > > > Daniel, are you working on this PR? > > Sort of. Finished the library part. > > Btw, CPU_TIME has a fallback implementation using times(2). As "times() > returns the number of clock ticks that have elapsed since an arbitrary > point in the past", it is IMO unsuitable to be used with CPU_TIME. > CPU_TIME is supposed to return a "value representing the elapsed CPU > time in seconds [since start of the program]". Thus, I ditched this > fallback for the common implementation. > Actually, you don't need to remove the fallback because Niote 13.8 in the F95 standard makes it clear that the initialize time does not need to be referenced to zero. >From Note 13.8: The start time is left imprecise because the purpose is to time sections of code, as in the example. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34533