Skip to content

Commit

Permalink
Clock.MenuApplet: Only wake up once per second
Browse files Browse the repository at this point in the history
This avoids an issue where we'd sometimes go longer than a whole second
between updates. Thanks to Roman May for the suggestion! :^)
  • Loading branch information
awesomekling committed Dec 29, 2019
1 parent fed3416 commit 8721d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MenuApplets/Clock/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ClockWidget final : public GWidget {
{
m_time_width = Font::default_bold_font().width("2222-22-22 22:22:22");

m_timer = CTimer::construct(300, [this] {
m_timer = CTimer::construct(1000, [this] {
static time_t last_update_time;
time_t now = time(nullptr);
if (now != last_update_time) {
Expand Down

0 comments on commit 8721d54

Please sign in to comment.