From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13897 invoked by alias); 10 Aug 2011 15:30:47 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29666 Received: (qmail 12763 invoked from network); 10 Aug 2011 15:30:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110810083017.ZM4722@torch.brasslantern.com> Date: Wed, 10 Aug 2011 08:30:17 -0700 In-reply-to: <20110810124120.0479177b@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: PATCH: zsh/datetime $EPOCHREALTIME" (Aug 10, 12:41pm) References: <20110810122137.3a3e4c00@pwslap01u.europe.root.pri> <20110810124120.0479177b@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: PATCH: zsh/datetime $EPOCHREALTIME MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Aug 10, 12:41pm, Peter Stephenson wrote: } } I'm actually wondering if we ought to be a bit smarter and add an } epochrealtime array with the seconds and nanoseconds as elements } (guaranteed to be consistent, obviously). Exercise for the reader. Better (?) still: Allow the user to apply typeset to EPOCHSECONDS. If it's an int, it is as it is now. If it's a float, what you called EPOCHREALTIME. If an array, elements for seconds and nanoseconds. If a hash, the keys are tv_sec and tv_nsec like a timespec (convert from tv_usec when using gettimeofday). Too bad that would require mucking about with whether it's special and readonly, or else introducing provision for other special cases into typeset ...