mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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
Notes:
sideshowbarker
2024-07-19 10:33:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8721d54f240
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_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) {
|
||||
|
|
Loading…
Reference in a new issue