time usage for subprocesses

Zack Weinberg zack@bitmover.com
Fri Aug 6 23:47:00 GMT 1999


Jeffrey A Law wrote:
> 
>   In message < 199908070600.XAA07912@zack.bitmover.com >you write:
>   > The alternatives seem to be getrusage and times, and - as far as I can
>   > tell - they will only report *combined* child process times, which
>   > defeats the purpose.  I could put the reporting code into the
>   > children, but I liked that the change was limited to the driver.
> But it's trivial to get deltas given the rusage stats as you wait on
> each process in succession.

My impression was that times() and getrusage(RUSAGE_CHILDREN, ...)
would give me cumulative execution times for all the children up to
the moment I made the call.  Is that not the case?

Sorry for asking for a portability lesson...

zw


More information about the Gcc-patches mailing list