[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: clock_gettime(CLOCK_PROCESS_CPUTIME_ID, ..) returns bogus time



On Tue, Feb 14, 2006 at 11:14:03PM +0100, Ladislav Michl wrote:
> Hi,
> 
> I just found the same problem as described here:
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=1256
> 
> CLOCK_PROCESS_CPUTIME_ID clock returns wall-clock time since process
> was started instead of CPU-time used by process.
> 
> Since I didn't find it in archives nor bugzilla I'd like to ask,
> whenever it is considered to be normal behaviour.
> It would also help if anynone could clarify execution time definition:
> http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_117
> To my understanding, time spent inside sleep() should not be counted.
> But it is...
> 
> (Current testing, linux-image-2.6.15-1-686, gcc-4.0.2-8, glibc-2.3.5-13)

You've left architecture out of your report.  Any NPTL-enabled package
will assume 2.6; if you're on e.g. MIPS, then you'll get this when
Debian has NPTL support for your target.

-- 
Daniel Jacobowitz
CodeSourcery



Reply to: