Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: support for nanosecond timestamps



On Thu, Nov 01, 2007 at 05:37:53PM +0000, Oliver Kiddle wrote:
> Stephane Chazelas wrote:
> > What about returning floating point numbers for zstat?
> 
> I've just looked at the documentation for stat to see how that might
> work. It'd end up returning the string representation rather than a float
> given the current interface. What exactly were you envisaging? It might
> be more useful to have it available with the -F (format) option. The only
> trouble there is that there is no standard for the letters to use in the
> format specifiers.  date(1) on Linux has %N for nanoseconds. Apache uses
> %q and %Q for milli and micro seconds. Do you know of any others?
[...]

%N is also used by ksh93:

printf '%(%N)T\n'

And there's %.s or %.# to have sec.nanosec

Cheers,
Stéphane



Messages sorted by: Reverse Date, Date, Thread, Author