mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +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
|
@ -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