Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!princeton!allegra!ulysses!bellcore!whuxcc!lcuxlm!whuxl!houxm!ihnp4!cuae2!ltuxa!cuuxb!dlm From: dlm@cuuxb.UUCP (Dennis L. Mumaugh) Newsgroups: net.sources.d,net.sources.bugs Subject: Re: uptime for System V Message-ID: Date: Wed, 24-Sep-86 15:07:34 EDT Article-I.D.: cuuxb.831 Posted: Wed Sep 24 15:07:34 1986 Date-Received: Fri, 26-Sep-86 20:50:46 EDT References: Reply-To: dlm@cuuxb.UUCP (Dennis L. Mumaugh) Distribution: world Organization: ATT Computer Systems Center, Lisle, Ill. Lines: 20 Keywords: uptime SysV Xref: mnetor net.sources.d:538 net.sources.bugs:829 In article sjm@dayton.UUCP (Steven J. McDowall) writes: > * uptime.c -- Print how long the system has been up > * System V Implmenentation > * > * 9/19/86 - Version 1.1 .... > uptime = (times(tbuf) / HZ); > New C compilers have the ability to pass structures on the argument of a function. Times requires a pointer to a structure. Thus > uptime = (times(&tbuf) / HZ); is correct. The second code is correct no matter what the compiler. I just talked with Paul and we agree. His worked because he used a trick and had an array instead of a structure. -- =Dennis L. Mumaugh Lisle, IL ...!ihnp4!cuuxb!dlm