Re: speed of execution
- From: "Nelu" <tandauioan@xxxxxxxxx>
- Date: 19 May 2006 07:35:31 -0700
pete wrote:
Nelu wrote:.... whatever is more appropriate :-).
where CLOCKS_PER_SEC equals 1000000 this function will return the
same value approximately every 72 minutes".
If this is the case, I hope his program doesn't need 72 minutes to
complete.
In that case he's better off using a stop watch :-).
... or maybe even a calendar.
That's why I asked, because it can be difficult to time in a
Is clock affected by other processes in a multitasking OS, or does it
count only when the CPU works on the calling process?
"the implementation's best approximation
to the processor time used by the program"
... which means
"only when the CPU works on the calling process"
except that
"other processes in a multitasking OS"
make the timing more complicated and possibly less accurate.
multitasking
environment. I guess that's been taken care of in the man where it
says:
"The clock() function returns an approximation". I just didn't know
whether the "approximation" had to do with multitasking or it was
something related to the processor no matter what the environment was.
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
.
- References:
- speed of execution
- From: kavi
- Re: speed of execution
- From: pete
- Re: speed of execution
- From: Nelu
- Re: speed of execution
- From: pete
- speed of execution
- Prev by Date: Re: speed of execution
- Next by Date: single x double precision on 32bit arch
- Previous by thread: Re: speed of execution
- Next by thread: Re: speed of execution
- Index(es):