Future of 32 bit time_t?

Hal Murray hmurray at megapathdsl.net
Tue Mar 14 03:15:25 UTC 2017


esr at thyrsus.com said:
> Checking...oh, that's interesting. Since 2.6, Linux puts a struct timespec
> there, with some backward-compatibility macros. Your creation/mod/stat bits
> can have nanosecond resolution; who knew?

Neat.  Thanks.

>From the fstat man page:

           struct stat {
...
               /* Since Linux 2.6, the kernel supports nanosecond
                  precision for the following timestamp fields.
                  For the details before Linux 2.6, see NOTES. */

               struct timespec st_atim;  /* time of last access */
               struct timespec st_mtim;  /* time of last modification */
               struct timespec st_ctim;  /* time of last status change */

           #define st_atime st_atim.tv_sec      /* Backward compatibility */
           #define st_mtime st_mtim.tv_sec
           #define st_ctime st_ctim.tv_sec
           };


       Nanosecond timestamps are supported on XFS, JFS, Btrfs, and ext4 (since
       Linux  2.6.23).  Nanosecond timestamps are not supported in ext2, ext3,
       and Reiserfs.  On filesystems that do not support subsecond timestamps,
       the nanosecond fields are returned with the value 0.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list