1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibCore+Userland: Don't auto-start new Core::Timers

This was unintuitive, and only useful in a few cases. In the majority,
users had to immediately call `stop()`, and several who did want the
timer started would call `start()` on it immediately anyway. Case in
point: There are only two places I had to add a manual `start()`.
This commit is contained in:
Sam Atkins 2023-01-11 19:36:46 +00:00 committed by Andreas Kling
parent a8cf0c9371
commit 6edc0cf5ab
10 changed files with 12 additions and 8 deletions

View file

@ -48,7 +48,6 @@ Compositor::Compositor()
1000 / 60, [this] {
notify_display_links();
});
m_display_link_notify_timer->stop();
m_compose_timer = Core::Timer::create_single_shot(
1000 / 60,
@ -57,6 +56,7 @@ Compositor::Compositor()
},
this)
.release_value_but_fixme_should_propagate_errors();
m_compose_timer->start();
m_immediate_compose_timer = Core::Timer::create_single_shot(
0,
@ -65,6 +65,7 @@ Compositor::Compositor()
},
this)
.release_value_but_fixme_should_propagate_errors();
m_compose_timer->start();
init_bitmaps();
}