Skip to content

Commit

Permalink
front_panel: Don't fetch time twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrbt committed Oct 2, 2024
1 parent 6d08f88 commit 2ca4344
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions software/src/modules/front_panel/front_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ void FrontPanel::update_status_bar()

struct timeval tv_now;
if (clock_synced(&tv_now)) {
time_t now = time(nullptr);
struct tm tm;
localtime_r(&now, &tm);
localtime_r(&tv_now->tv_sec, &tm);
hours = tm.tm_hour;
minutes = tm.tm_min;
seconds = tm.tm_sec;
Expand Down

0 comments on commit 2ca4344

Please sign in to comment.