Skip to content

Commit

Permalink
panel: clock second tick is a second fast
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Jan 22, 2024
1 parent d28f700 commit 5af3ec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/panel_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5af3ec2

Please sign in to comment.