第二解析时间在以下字段中:
time_t st_atime; time_t st_mtime; time_t st_ctime;
但是该人http://www.kernel.org/doc/man-
pages/online/pages/man2/stat.2.html的 “ NOTES”部分说:
从内核2.5.48开始,stat结构为三个文件时间戳字段支持纳秒分辨率。如果定义了_BSD_SOURCE或_SVID_SOURCE功能测试宏,则Glibc将使用st_atim.tv_nsec形式的名称来公开每个字段的纳秒分量。这些字段是在POSIX.1-2008中指定的,并且从版本2.12开始,如果_POSIX_C_SOURCE的值定义为200809L或更大,或者_XOPEN_SOURCE的值定义为700或更大,则glibc也将公开这些字段名。如果没有定义上述宏,则以st_atimensec形式的名称公开纳秒值。
因此,nsec的时间部分在同一“ struct stat”中:(/usr/include/asm/stat.h)
unsigned long st_atime_nsec; unsigned int st_mtime_nsec; unsigned long st_ctime_nsec; #define STAT_HAVE_NSEC 1



