Re: ftime() not giving miliseconds?

Andreas Jaeger (aj@arthur.rhein-neckar.de)
12 May 1999 07:31:24 +0200


>>>>> Harald Koenig writes:

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

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

glibc has been fixed, the fix will be in glibc 2.1.1.

Andreas

1999-05-11 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>

* sysdeps/unix/sysv/linux/ftime.c: Use the bsd implementation, not
the generic one.

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.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/