autoconf
[Top][All Lists]
Advanced

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

Re: Portable CPU time report


From: Kevin Ryde
Subject: Re: Portable CPU time report
Date: Fri, 16 May 2003 08:42:05 +1000
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux)

Bill Moseley <address@hidden> writes:
>
> I'm looking for a portable way to get CPU usage time.  I'm thinking
> I should check for getrusage(2), times(2), and then clock(3).  Is
> anyone doing this, and if so what configure checks are you testing
> (besides the three functions above)?

As far as portable stuff goes, clock_gettime is a newish function that
I take it is supposed to be portable, but it has poor resolution on
systems I've seen so far (OSF 5, GNU systems with recent glibc).

In gmp we've ended up using a bunch of system specific stuff to get
maximum resolution (see speed_starttime() in tune/time.c if
interested).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]