Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [RFC] Millisecond and microsecond specifiers for TIMEFMT
- X-seq: zsh-workers 42118
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [RFC] Millisecond and microsecond specifiers for TIMEFMT
- Date: Wed, 13 Dec 2017 18:01:52 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1513188114; bh=RasJuj9LHX3OGf8Gz2Nx7EjrVes6/hzXk8p4Hl1iqLE=; h=Date:From:To:Subject:In-Reply-To:References; b=x5qTUxK+kBuqZAudE0GstxT55eM7M9Lk2LDCuqZKG/5kfwY3aHtUrxUKyvV00v6tj RZTUEnJwXlhNqSpf1I0gPVyXRGavq4iCJHphVpdiZ9bev7klhAvBvbfShmR/BLbzSF kU6VuNInLLsGxQ+eqi0CMmF4ri3PRulogpUoBY0MGVlxJLMQasyDZgXdOMpqZ4ToEE gWbZnehMwELdCpSV3GYcLu8Ga/JZX7xM7ISXkN0K2zajo0FFrXMvvv++gVyE5wTk/2 t9LfYUDalcc9o+VsKsqFrIuAn2WO5htA0XwLig47f1p568VXM82XKHtERAdEs9mdVD UNk4hKqvYVnxg==
- In-reply-to: <6A9332CC-D501-4B1C-9347-92D0E87E45D7@dana.is>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <6A9332CC-D501-4B1C-9347-92D0E87E45D7@dana.is>
On Mon, 11 Dec 2017 19:58:41 -0600
dana <dana@xxxxxxx> wrote:
> I am often interested in getting sub-second-precision timing on shell
> commands, but the `time` built-in doesn't offer this (not really,
> anyway). I can kind of work around it by writing a function that
> fiddles with SECONDS, but my function doesn't have the fancy syntax
> support that `time` has, which makes it inconvenient for measuring
> some things.
You don't need to fiddle with SECONDS beyond turning it into floating
point,
typeset -F SECONDS
at which point it's just a question of subtraction, which isn't usually
regarded as particularly problematic.
> What i'd really like is if TIMEFMT supported sequences for milliseconds and
> microseconds.
>
> I had a look and it really does seem quite simple to implement. How would you
> feel about something like the change below?
Can't see any obvious problem with this. Just needs documenting.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author