Re: [Freeciv-Dev] [PATCH] CHRONO
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
David Pfitzner <dwp@xxxxxxxxxxxxxx> writes:
> Re your patch: should the getrusage stuff be protected by
> configure checks, or can we expect getrusage everywhere?
> Oh, ok, it's still only used if CHRONO is defined, so I guess
> only define CHRONO if you know what you're doing and know
> that it works, like the current situation with gettimeofday.
Yes, you got the point.
> I think my approach is a bit more general, but perhaps
> also a bit more bloated...
I see that you should use getrusage to time if you can. Because
you get generally immunity to other load.
There is problems with getrusage. At linux v2.2/glibc v2.1 real
resolution is only 0.01s. Therefore it is not suitable to time
all tasks. My approach needs also gettimeofday to get additional
accuracy, with less reliability.
--
//Markus
|
|