From 06aa8da96e68d6e9aaaee065c34e1e96520e20d5 Mon Sep 17 00:00:00 2001 From: romkatv Date: Tue, 16 Jul 2019 00:47:50 +0200 Subject: [PATCH] round to seconds instead of truncating --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 9201dafe..9e0630e6 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -926,7 +926,7 @@ prompt_command_execution_time() { if (( _P9K_COMMAND_DURATION < 60 )); then if [[ $POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION == 0 ]]; then - local -i sec=_P9K_COMMAND_DURATION + local -i sec=$((_P9K_COMMAND_DURATION + 0.5)) else local -F $POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION sec=_P9K_COMMAND_DURATION fi