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

Re: foo=${(z)${(s:.:)SECONDS}} ; echo ${foo[1]}.${(r:2:)foo[2]}

On Thu, 25 Oct 2007, Peter Stephenson wrote:

Aargh. OK. The *precision*, in the sense that the floating point number comes out with so many digits, is indeed 10. However, the *accuracy* is 6 digits. That's because when it's floating point SECONDS uses a microsecond timer. That's what I should be saying in the manual.

hehe... yeah, after reading that i did a quick review of the difference between "accuracy" and "precision", and came away from it no less confused.

   typeset -F 2 SECONDS

is still the, er, right answer to the question you asked.

holy crap!! that's slick!! (the deeper i dig with zsh the more i hear myself saying that.)

thanks also to Angel Olivera for getting me to the right section of the man-page for back references, which i was completely overlooking before.


 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808

	"We don't know if lobsters feel pain... [but] since
	 pain is a perception, we often don't know whether
	 people feel it either"
		-- Prof. Edward Kravitz,
		Harvard Medical School

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