Re: question on timing results

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

 



> > clock() returns an approximation of the CPU time used by the actual
> process,
> > so while load from other programs is a factor (particularly since it'll
> make
> > your program wait for IO, etc.) it should do basically what you want.
> 
> Also check out the times(2) facility.  It's not ISO C, but it is POSIX and 
> it has some advantages over clock(3).
> 
> -- 
>

Thanks, what exactly are the advantages? These are sometimes long calculations
so the processor will be running for long. Also, is there an example on using
times(2) somewhere? A Google search on times(2) example C did not reveal much,
but the choice of keywords may not have been apt. (One problem with the name of
the language  called C is that is just a letter, as opposed to
fortran/C++/pascal et al, which is more distinctive.

Sorry and thanks for all the help!

Best wishes!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux