timeit for debug

Time the running time of a closure.

Signature

> timeit (closure)

Parameters

  • closure: the closure to run

Examples

Times a command within a closure

> timeit { sleep 500ms }

Times a command using an existing input

> http get https://www.nushell.sh/book/ | timeit { split chars }