Horst wrote,
>To which extend do standard commands, like stat or tar actually support 
>floating point time stamps? (or fractions of a second).  I always only 
>seem to see integers reported/stored.

The resolution of timestamps reported by "stat" depends on the filesystem.
Classic UNIX filesystems (including Linux's ext2/3) store times with
one-second resolution, and some filesystems have even lower resolutions
(MS-DOS, for example, stores timestamps with two-second resolution).
Some newer filesystems have timestamps with much higher resolution
(for example, JFS and XFS, I believe).

Naturally, on filesystems that support only one-second resolution, "stat"
will never report anything but zeros after the decimal point.

On classic UNIX systems, the stat() system call (which the "stat" command
is just a simple wrapper around) supports only one-second resolution.
Modern Linux kernels support nanosecond resolution, but this is a fairly
recent innovation.

Support for fractions of a second in other programs will be highly
dependent on the program.  Most UNIX/Linux software probably still assumes
that the times returned by stat() are classic UNIX one-second-resolution
timestamps.  "tar", for example, archives only one-second-resolution
timestamps, as twelve-characer octal strings...this is mandated by a POSIX
standard, and for the sake of backward compatibilty is unlikely to change
anytime soon.

               - Neil Parker
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to