Re: ftime() not giving miliseconds?

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Tue, 11 May 1999 15:32:18 +0200


On May 11, Guest section DW wrote:

> This has nothing to do with linux-kernel.
> The routine ftime is obsolete, but inspection of its source
> shows
>
> timebuf->millitm = 0;
>
> (in sysdeps/generic/ftime.c).
> The more desirable
>
> timebuf->millitm = (tv.tv_usec + 999) / 1000;
>
> is found only in sysdeps/unix/bsd/ftime.c,
> while linux uses the buggy generic version.
>
> So, I updated the man page:
>
> ...
>
> BUGS
> Under libc4 and libc5 the millitm field is meaningful.
> But glibc2 is buggy and returns 0 there.
>
> HISTORY
> The ftime function appeared in 4.2BSD.
> ...

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...

>
>
> Andries
>
>
> [Indeed, a random libc4 machine (with Linux 1.2.11) says
> # ./timebug
> It's now 926378129.583
> It's now 926378129.605
> ]
>
> -
> 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/

Harald

--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

- 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/