diff options
| author | shun095 <8069181+shun095@users.noreply.github.com> | 2025-01-24 05:04:45 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 21:04:45 +0100 |
| commit | d2e79501b252ffafa2a25b541f67332c3e186807 (patch) | |
| tree | 765fab370db5d52142891fa15f174c8a248ca071 /plugins/timer | |
| parent | 69410e702014b6f6f09f659a5747c5a6ace7a09a (diff) | |
| download | zsh-d2e79501b252ffafa2a25b541f67332c3e186807.tar.gz zsh-d2e79501b252ffafa2a25b541f67332c3e186807.tar.bz2 zsh-d2e79501b252ffafa2a25b541f67332c3e186807.zip | |
fix(timer): minutes calculation logic (#12857)
Diffstat (limited to 'plugins/timer')
| -rw-r--r-- | plugins/timer/timer.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/timer/timer.plugin.zsh b/plugins/timer/timer.plugin.zsh index d21d59989..6baf1f681 100644 --- a/plugins/timer/timer.plugin.zsh +++ b/plugins/timer/timer.plugin.zsh @@ -6,7 +6,7 @@ __timer_current_time() { } __timer_format_duration() { - local mins=$(printf '%.0f' $(($1 / 60))) + local mins=$(printf '%.0f' $(($(IFS='.' read int dec <<< "$1"; echo $int) / 60))) local secs=$(printf "%.${TIMER_PRECISION:-1}f" $(($1 - 60 * mins))) local duration_str=$(echo "${mins}m${secs}s") local format="${TIMER_FORMAT:-/%d}" |
