From 5af3ec2f5f9352f1d8fdf4ee8c778db99449ddc7 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 22 Jan 2024 21:45:14 +0900 Subject: [PATCH] panel: clock second tick is a second fast --- lib/panel_clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/panel_clock.c b/lib/panel_clock.c index 650baf55..70165671 100644 --- a/lib/panel_clock.c +++ b/lib/panel_clock.c @@ -58,7 +58,7 @@ void _menu_draw_MenuEntry_Clock(gfx_context_t * ctx, struct MenuEntry * self, in gettimeofday(&now, NULL); timeinfo = localtime((time_t *)&now.tv_sec); - double sec = timeinfo->tm_sec + tick((double)now.tv_usec / 1000000.0); + double sec = timeinfo->tm_sec + tick((double)now.tv_usec / 1000000.0) - 1.0; double min = timeinfo->tm_min + sec / 60.0; double hour = (timeinfo->tm_hour % 12) + min / 60.0;