diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index 134288ce..ef79274e 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -1,5 +1,4 @@ #include "modules/clock.hpp" -#include #include using zoned_time = date::zoned_time; @@ -37,14 +36,11 @@ struct CachedCalendar { } }; -std::mutex cached_calendar_mutex; // protects cached_calendar. CachedCalendar cached_calendar; std::string calendar_text(const waybar_time& wtime, const date::weekday& first_dow) { const auto daypoint = date::floor(wtime.ztime.get_local_time()); const auto ymd = date::year_month_day(daypoint); - - const std::lock_guard lock(cached_calendar_mutex); if (cached_calendar.ymd == ymd) { return cached_calendar.text; }