From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28889 invoked from network); 3 Dec 1996 06:59:32 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 3 Dec 1996 06:59:32 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA03313; Tue, 3 Dec 1996 01:42:39 -0500 (EST) Resent-Date: Tue, 3 Dec 1996 01:42:39 -0500 (EST) Message-Id: <199612030642.BAA07569@redwood.skiles.gatech.edu> To: rft@titus.cg.tuwien.ac.at Cc: zsh-workers@math.gatech.edu Subject: Re: time command bug in next headers? In-reply-to: Your message of "Mon, 02 Dec 1996 23:33:00 +0100." <9612022233.AA04440@raven.cg.tuwien.ac.at> Date: Tue, 03 Dec 1996 01:42:32 -0500 From: Richard Coleman Resent-Message-ID: <"BvzM33.0.hp.Ulyeo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2526 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > Now. in a similar vein I have a few questions: there are a number of > different system call interfaces for getting the user and system time of the > process: > times(...) > vtimes(....) > getrusage(...) > > What are the advantages and disadvantages of all these interfaces with respect > to portability, overhead, and time resolution? On Nextstep at least it seems > as if the getrusage(...) interface has a resolution of 1/100 of a second > whereas times only has 1/60 sec resolution. times() is part of the POSIX standard, and so should give the greatest amount of portability for the future. At one time, the code used getrusage() for BSD style machines, and times() for SYSV style machines. The code to do this was very ugly (way too many #define's scattered in the code). As part of the POSIX-ification of the code, this was all rewritten to use times() everywhere. The best way to fix the problem with the Next's is to just use some #ifdef's to change the clock tick back to 1/60 (what in the hell was Next thinking when they changed this). rc