mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibCore: Make Core::Timer::create_single_shot() create a stopped timer
None of the code using this actually expected the timer to fire right away, but they would instead call start() on it once they were ready to accept a timer fire. Let's make the API behave the way its clients believed it did. :^)
This commit is contained in:
parent
f7116bba43
commit
add01b304b
Notes:
sideshowbarker
2024-07-19 00:29:11 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/add01b304b2
1 changed files with 1 additions and 0 deletions
|
@ -39,6 +39,7 @@ public:
|
|||
{
|
||||
auto timer = adopt(*new Timer(interval, move(timeout_handler), parent));
|
||||
timer->set_single_shot(true);
|
||||
timer->stop();
|
||||
return timer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue