From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <65896917d2f8f71f41d5e616017ef3de.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199603071140.GAA21195@postman.osf.org> Date: Thu, 07 Mar 1996 12:40:26 +0100 From: Fred Roy Subject: Re: Re: good times(2|3)... In-Reply-To: <199603061638.JAA20839@koala.azstarnet.com> Fred> PS (times()): Was it a missing 's' in the library sources Fred> you're working on ? I think so, because (at least with Fred> BLADE_0.3 libs) times() and time() return the same value! David> I'm not sure what you mean. My current sources look OK and David> I know they work in GNU libc, but maybe I'm missing something David> since I haven't actually tried the new times() in libc-0.4x. Ok, my english was somehow strange; let's retry in C: /* --- */ #include #include #include #include #include main() { time_t my_t; struct tms my_tms; long rt, rts; rt= (long)time(&my_t); rts= (long)times(&my_tms); printf("time() returned %ld\n", (long)rt); printf("times() returned %ld\n", (long)rts); if ( rts == rt || rts == (rt + 1) ) printf("!\n"); else printf("I prefer that\n"); /* misc. */ printf("\n"); printf("current time: %ld\n",(long)my_t); printf("current times: utime=%ld stime=%ld\n", (long)my_tms.tms_utime, (long)my_tms.tms_stime); } /* --- */ What I get with my (unmodifed) Linux/Alpha/BLADE_0.3 [unmodified: e.g. without no updates of libraries] is: time() returned 826217813 times() returned 826217813 ! current time: 826217813 current times: utime=0 stime=4 What I get with my Slackware Linux/i486 is: time() returned 826196909 times() returned 553681879 I prefer that current time: 826196909 current times: utime=0 stime=2 What do you prefer? (take of course this ubiquitous? question as you please!) fred PS: it's just for fun... I had very few problems with Linux/Alpha libs and system headers: you've done a great job.