From 246a500fe8d767b2bd75676fef3908ff2c531e65 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 17 Nov 2005 13:36:31 +0000 Subject: [PATCH] Added LINUX NOTES describing nanosecond timestamps. --- man2/stat.2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/man2/stat.2 b/man2/stat.2 index e6feb3829..2f44803bc 100644 --- a/man2/stat.2 +++ b/man2/stat.2 @@ -247,6 +247,20 @@ The `sticky' bit (S_ISVTX) on a directory means that a file in that directory can be renamed or deleted only by the owner of the file, by the owner of the directory, and by a privileged process. +.SH "LINUX NOTES" +Since kernel 2.5.48, the +.I stat +structure supports nanosecond resolution for the three +file timestamp fields. +Glibc exposes the nanosecond component of each field using names either +of the form +.IR st_atim.tv_nsec , +if the _BSD_SOURCE or _SVID_SOURCE feature test macro is defined, +or of the form +.IR st_atimensec , +if neither of these macros is defined. +On file systems that do not support sub-second timestamps, +these nanosecond fields are returned with the value 0. .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno