mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:27:34 +00:00
Clock.MenuApplet: Only wake up once per second
This avoids an issue where we'd sometimes go longer than a whole second between updates. Thanks to Roman May for the suggestion! :^)
This commit is contained in:
parent
fed3416bd2
commit
8721d54f24
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ public:
|
||||||
{
|
{
|
||||||
m_time_width = Font::default_bold_font().width("2222-22-22 22:22:22");
|
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;
|
static time_t last_update_time;
|
||||||
time_t now = time(nullptr);
|
time_t now = time(nullptr);
|
||||||
if (now != last_update_time) {
|
if (now != last_update_time) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue