Comments

ftime is an obsolete variation on gettimeofday, offering only
millisecond time resolution; it was probably a system call in ooold
versions of BSD Unix. For historic reasons, we had three
implementations of it. These are all consolidated into time/ftime.c,
and then the function is made a compatibility symbol. The public
header file that declared it, its result structure, and nothing else,
is removed.
For some reason, the implementation of ftime in terms of gettimeofday
was rounding rather than truncating microseconds to milliseconds. In
all the other places where we use a higher-resolution time function to
implement a lower-resolution one, we truncate. ftime is changed to
match, just for tidiness' sake.
Like gettimeofday, ftime tries to report the time zone, and using that
information is always a bug. This patch dummies out the reported
timezone information; the timezone and dstflag fields of the
returned "struct timeb" will always be zero.
* time/tst-ftime.c
* time/sys/timeb.h
* sysdeps/unix/bsd/ftime.c
* sysdeps/unix/sysv/linux/ftime.c: Delete file.
* time/tst-ftime_l.c: Rename to tst-strftime_l.c.
* time/ftime.c (ftime): Make a compatibility-only symbol.
Replace implementation with the code formerly in
sysdeps/unix/bsd/ftime.c, then change that code to use
__clock_gettime instead of __gettimeofday and to truncate
rather than rounding. Always set the timezone and dstflag
fields of the timebuf argument to zero.
* time/Makefile (headers): Remove sys/timeb.h.
(tests): Remove tst-ftime, change tst-ftime_l to
tst-strftime_l.
* conform/Makefile: XFAIL all tests related to sys/timeb.h.
---
conform/Makefile | 9 ++++
sysdeps/unix/bsd/ftime.c | 40 ----------------
sysdeps/unix/sysv/linux/ftime.c | 3 --
time/Makefile | 8 ++--
time/ftime.c | 40 +++++++++-------
time/sys/timeb.h | 43 ------------------
time/tst-ftime.c | 58 ------------------------
time/{tst-ftime_l.c => tst-strftime_l.c} | 0
8 files changed, 36 insertions(+), 165 deletions(-)
delete mode 100644 sysdeps/unix/bsd/ftime.c
delete mode 100644 sysdeps/unix/sysv/linux/ftime.c
delete mode 100644 time/sys/timeb.h
delete mode 100644 time/tst-ftime.c
rename time/{tst-ftime_l.c => tst-strftime_l.c} (100%)