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: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Tue, 29 Jun 1999 11:59:04 +1000

Markus Linnala <maage@xxxxxxxxx> wrote:

> I see that you should use getrusage to time if you can. Because
> you get generally immunity to other load.

I used clock() for CPU time ("system time"), which I think
should be insensitive to load too?  Or would getrusage still 
be better than clock()?  clock() does have somwhat poorer 
resolution than gettimeofday, but since they're really measuring 
different things probably both are useful. 

(I wasn't sure whether to measure _both_ CPU and user time
in my "timer" struct.  In the end I decided to let the user
decide which, and you can just use two separate timers if 
you want to measure both.  Or maybe have another layer of 
structs and functions to automatically measure both...)

Regards,
-- David

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