mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +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:
parent
a8cf0c9371
commit
6edc0cf5ab
10 changed files with 12 additions and 8 deletions
|
@ -17,8 +17,8 @@ Timer::Timer(Object* parent)
|
|||
Timer::Timer(int interval_ms, Function<void()>&& timeout_handler, Object* parent)
|
||||
: Object(parent)
|
||||
, on_timeout(move(timeout_handler))
|
||||
, m_interval_ms(interval_ms)
|
||||
{
|
||||
start(interval_ms);
|
||||
}
|
||||
|
||||
void Timer::start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue