delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/27/06:32:18

Date: Tue, 27 Nov 2001 13:27:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Alex Vinokur <alexvn AT bigfoot DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: uclock() and struct rusage
In-Reply-To: <3C03503F.E9AE61D3@bigfoot.com>
Message-ID: <Pine.SUN.3.91.1011127132418.22199B@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019