question on timing results
Globe Trotter
itsme_410 at yahoo.com
Thu Jun 9 12:40:03 UTC 2005
> > 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
More information about the users
mailing list