From 4aabc71d5402aa90769bddf221e92c4ca37c7e85 Mon Sep 17 00:00:00 2001 From: Jens Welsch <21183736-JensWelsch@users.noreply.gitlab.com> Date: Thu, 22 Jan 2026 12:40:13 +0100 Subject: [PATCH] Aligned realtime clock to system clock --- internal/p10k.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ff14c1a6..151a9ceb 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3527,7 +3527,13 @@ _p9k_prompt_time_compute() { } _p9k_prompt_time_async() { - sleep $_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL || true + local I=$_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL + + # No alignment needed in default case + (( I <= 1 )) && { sleep 1 || true; return } + + # Sleep until the next aligned boundary: I - (now mod I) + sleep $(( I - ($(date +%s) % I) )) || true } _p9k_prompt_time_sync() {