Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: zsh/datetime $EPOCHREALTIME
- X-seq: zsh-workers 29665
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: zsh/datetime $EPOCHREALTIME
- Date: Wed, 10 Aug 2011 12:41:20 +0100
- In-reply-to: <CAHYJk3SRNjDv=fzZ9t_UHJ-xxmMTNe9Vd7L6mFcX7X4VBpc4WA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <20110810122137.3a3e4c00@pwslap01u.europe.root.pri> <CAHYJk3SRNjDv=fzZ9t_UHJ-xxmMTNe9Vd7L6mFcX7X4VBpc4WA@mail.gmail.com>
On Wed, 10 Aug 2011 13:37:15 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On 10 August 2011 13:21, Peter Stephenson <Peter.Stephenson@xxxxxxx> wrote:
> > I had a need for the current time to better than one second precision in
> > a shell function, which currently (as far as I can see) the shell
> > doesn't do. It does for SECONDS, but that's not useful for comparison
> > with times used by the rest of the system.
>
> Curious, I made a similar patch last week but didn't post it yet :)
> Your patch looks better though, my variable just had the nanoseconds
> part in it, and no docs. I did put a --disable-rt option in mine
> though.
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.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
Messages sorted by:
Reverse Date,
Date,
Thread,
Author