github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/commands/time.md (about) 1 # `time` 2 3 > Returns the execution run time of a command or block 4 5 ## Description 6 7 `time` is an optional builtin which runs a command or block of code and 8 returns it's running time. 9 10 ## Usage 11 12 ``` 13 time command parameters -> <stderr> 14 15 time { code-block } -> <stderr> 16 ``` 17 18 ## Examples 19 20 ``` 21 » time sleep 5 22 5.000151513 23 24 » time { out "Going to sleep"; sleep 5; out "Waking up" } 25 Going to sleep 26 Waking up 27 5.000240977 28 ``` 29 30 ## Detail 31 32 `time`'s output is written to STDERR. However any output and errors written 33 by the commands executed by time will also be written to `time`'s STDOUT 34 and STDERR as usual. 35 36 ## See Also 37 38 * [`exec`](../commands/exec.md): 39 Runs an executable 40 * [`sleep`](../optional/sleep.md): 41 Suspends the shell for a number of seconds 42 * [`source`](../commands/source.md): 43 Import Murex code from another file of code block 44 45 <hr/> 46 47 This document was generated from [builtins/core/time/time_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/core/time/time_doc.yaml).