-
Mark Harris authored
The ftime() function, introduced in V7 Unix (1979), gets the current time in seconds and milliseconds, and time zone information. It was marked as a legacy interface in POSIX.1-2001, and removed altogether from POSIX.1-2008. The gettimeofday() function, originally from 4.1 BSD, gets the current time in seconds and microseconds, and optional time zone information, and was marked as obsolete in POSIX.1-2008 although it was kept in the standard. The POSIX recommended function for getting time with sub-second resolution is clock_gettime(), which was introduced in POSIX.1b-1993 and is now part of the base POSIX standard; it supports multiple clocks and nanosecond resolution. Additionally the function timespec_get() was introduced in C11 and also supports nanosecond resolution. To support dates beyond the year 2038, glibc and other libraries are being updated to support 64-bit time_t even on 32-bit architectures, requiring new implementations of interfaces that w...