Include timespec.h.
authorJim Meyering <jim@meyering.net>
Fri, 1 Mar 2002 23:57:21 +0000 (23:57 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 1 Mar 2002 23:57:21 +0000 (23:57 +0000)
commit17e6a0e4bb47c942fbba4a218a7a16ad2385262b
tree0feedf6fa4b3952cfdbc27816a563c7ee1400dcd
parent9f1c3a0e225be0c1f7bff622de91f7fe1c984c10
Include timespec.h.
(strftime, time, stime): Remove declarations; no longer needed.
(usage): Document %N.
(main): Use gettime rather than time to get the time of day,
so that we can get fractional times.
Similarly for settime and stime, so that we can set fractional times
(though this currently is not available to the user since we don't
parse fractional times; add FIXMES for that).
Check for gettime failures; e.g. this can occur if it
is past 2038 and we are a 32-bit app running on a 64-bit OS.
Get fractional part of file time stamps.
Do not falsely report failures just because time_t happens to be -1
(e.g. a file time stamp 1 second before the epoch).
(show_date): 2nd arg is now struct timespec, not time_t.
All uses changed.  Use nstrftime rather than strftime, so that
we can format fractional seconds.
src/date.c