Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
Re: [Freeciv-Dev] [PATCH] CHRONO
Home

Re: [Freeciv-Dev] [PATCH] CHRONO

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] [PATCH] CHRONO
From: Markus Linnala <maage@xxxxxxxxx>
Date: 28 Jun 1999 20:04:06 +0300
Reply-to: Markus Linnala <maage@xxxxxxxxx>

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

[Prev in Thread] Current Thread [Next in Thread]