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:
Andreas Kling 2020-12-28 20:47:46 +01:00
parent f7116bba43
commit add01b304b

View file

@ -39,6 +39,7 @@ public:
{
auto timer = adopt(*new Timer(interval, move(timeout_handler), parent));
timer->set_single_shot(true);
timer->stop();
return timer;
}