Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: time command bug in next headers?
- X-seq: zsh-workers 2526
- From: Richard Coleman <coleman@xxxxxxxxxxxxxxx>
- To: rft@xxxxxxxxxxxxxxxxxxxxx
- Subject: Re: time command bug in next headers?
- Date: Tue, 03 Dec 1996 01:42:32 -0500
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: Your message of "Mon, 02 Dec 1996 23:33:00 +0100." <9612022233.AA04440@xxxxxxxxxxxxxxxxxxxxx>
> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author