Re: ftime() not giving miliseconds?

Guest section DW (dwguest@win.tue.nl)
Wed, 12 May 1999 00:56:16 +0200 (MET DST)


From: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>

On May 11, Guest section DW wrote:

> So, I updated the man page:
>
> BUGS
> Under libc4 and libc5 the millitm field is meaningful.
> But glibc2 is buggy and returns 0 there.

IMHO you should not update the man page (and declare it a `feature')
but fix glibc !! face it, it's a _BUG_ to break such lib calls
which have been around for ages...

Aha - it is a bug you think? And I listed it under BUGS? We agree.

It should be fixed you think? We agree again - perhaps you noticed
the cc to the glibc maintainer?

It should not be mentioned in the man page?
Here we disagree. It is broken in glibc2.0 and glibc2.1, that is,
in a large fraction of present-day Linux installations.
For the coming few years no application can expect millisecond accuracy
from ftime(). So, people should use gettimeofday() if they need such
accuracy. The routine ftime() was obsolete already, but worked fine
with libc4 and libc5. Now that it turns out to be broken with glibc2
it is more important that people avoid it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/