> As an alternative, I would like to suggest adding a new IEx helper t/0,1 that > would return the execution time of the previous command or the nth command > (similar to v/0,1).
Perfect solution IMO! It could also work with an anonymous function: `t(fn -> func3() end)` Best, Kelvin Stinghen [email protected] > On Oct 17, 2019, at 18:07, Fernando Tapia Rico <[email protected]> wrote: > > I like the idea too, but I'm concerned about printing unexpected messages in > the REPL, users might not know where those messages are coming from. > > As an alternative, I would like to suggest adding a new IEx helper t/0,1 that > would return the execution time of the previous command or the nth command > (similar to v/0,1). > > > On Thursday, October 17, 2019 at 10:10:49 PM UTC+2, José Valim wrote: > I like this idea. A PR would be welcome. What should be the default trigger? > 5s? > > On Wednesday, August 7, 2019 at 12:51:17 AM UTC+2, Exempll wrote: > > This would be a neat detail. It is easy to forget to time a long-running > function, and sometimes, when you are surprised by the running time, you want > to know how long it ran for in retrospect. Something like `[iex] OK > time=4.1s` right before the next prompt. It wouldn't need to be displayed for > every command, but possibly just for the commands that pass a certain running > time threshold. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/9dc355ff-e59e-48a1-84e6-75f0e0151287%40googlegroups.com > > <https://groups.google.com/d/msgid/elixir-lang-core/9dc355ff-e59e-48a1-84e6-75f0e0151287%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/817F83AD-FA05-48DB-A157-6F8D1F62AE2B%40gmail.com.
