Date: Tue, 27 Nov 2001 13:27:02 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Alex Vinokur cc: djgpp AT delorie DOT com Subject: Re: uclock() and struct rusage In-Reply-To: <3C03503F.E9AE61D3@bigfoot.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 27 Nov 2001, Alex Vinokur wrote: > It seems that it is preferable to use uclock() > instead of 'struct rusage' to get user time used by process > Resolution of uclock() is higher than 'struct rusage'. It depends on whether you value resolution more than stability and reliability. `clock' (used internally by `getrusage') is more reliable than `uclock', and can be used during much longer intervals (whereas `uclock' wraps around). Since `getrusage' is not something many people need to time very small code fragments, its low resolution is IMHO less important.