Re: first linux/alpha questions

Fred Roy (froy@gr.osf.org)
Mon, 15 Apr 1996 10:36:46 +0200


I had a similar problem some weeks ago with the time(1) command from
the BLADE_0.3 distribution. I suspected the times(2) library function,
that used to return an incorrect value, and I mailed what I found to the
linux-alpha@vger(..) and @redhat.com.
David M. proposed a fix in source form to the libc:

David > PS: All it should take is to replace libc/sysdeps/linux/alpha/times.c
David > with times.S containing the following lines (and updating the
David > Makefile).
David >
David > #include <sysdep.h>

David > SYSCALL__ (times, 1)
David > RETSYS(__times)

I did not experiment this fix, because I had already written a workaround in
the source code for time(1): I changed some of the calls to times(2) by calls
to time(2); while it gives an accuracy of 1 second (yes, dear), the command
line:
/usr/local/bin/time sleep 2
gives now a not silly value for the elapsed time. So you have now several
means
to fix the time(1) problem. Good luck!
fred