Mailing List Archive


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

Re: [tlug] using rusage



On 2008-06-19 11:30 +0900 (Thu), Hung Nguyen Vu wrote:

> What is wrong with this code?
> 
> wget http://aoclife.ddo.jp/~vuhung/tmp/testTimer.c
> gcc testTimer.c
> ./a.out
> stop:   0.000
> stop:   0.000
> stop:   0.000
> stop:   0.000

Absolutely nothing, as far as I can tell. Your program is reporting
exactly the results one would expect.

(Oh, what's wrong with the *programmer*, you mean? :-) Keep in mind that
your "utime" is the amount of CPU used by the process outside of kernel
code. Now the sleep call basically is a request to stop executing your
program for that amount of time....)

cjs
-- 
Curt Sampson       <cjs@example.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links