Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Timing function execution
- X-seq: zsh-users 27316
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Cc: Zach Riggle <zachriggle@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Timing function execution
- Date: Sat, 6 Nov 2021 11:40:46 -0700
- Archived-at: <https://zsh.org/users/27316>
- In-reply-to: <CAH+w=7brr8EjV=V8tV2weQ6DqT3eputT+UrDffRhTVtO0wcFDQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5=YX9v969sVNcVcpbb8R6e4EoyrAMpqpEDAnpSYQi9Sbw@mail.gmail.com> <CAH+w=7Z2jJqxSAa6sD_+jBEbDfHTfa_aMr_9WLfWG5T1OcCNFw@mail.gmail.com> <CAN=4vMrPTZ033Nm1GdSiTH7oA=TyS6PBOo7VpYtaaiYLoPBp7g@mail.gmail.com> <CAH+w=7aLZwYvN0_KOdf9=HcLBUtYzoHKjL4ck8tKCjau9qoduw@mail.gmail.com> <CAH+w=7brr8EjV=V8tV2weQ6DqT3eputT+UrDffRhTVtO0wcFDQ@mail.gmail.com>
On Sat, Nov 6, 2021 at 11:35 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> Glancing through builtin.c, "times" (based on library times(3)) may be
> the answer?
>
> I had entirely forgotten the existence of that builtin.
And (with apologies for the multiple follow-ups) I had also forgotten
that you can run "time" with no arguments:
% time; foo; time
shell 0.03s user 0.01s system 0% cpu 11:05.07 total
children 1.30s user 0.17s system 0% cpu 11:05.07 total
hello
shell 0.03s user 0.01s system 0% cpu 11:06.07 total
children 1.30s user 0.17s system 0% cpu 11:06.07 total
Messages sorted by:
Reverse Date,
Date,
Thread,
Author