Skip to content

Instantly share code, notes, and snippets.

@knadh
knadh / zsh-elapsed-time.md
Last active April 11, 2025 15:17
Elapsed and execution time for commands in ZSH

Elapsed and execution time display for commands in ZSH

Append this to your ~/.zshrc file.

function preexec() {
 timer=$(($(date +%s%0N)/1000000))