mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibIPC: Use create_single_shot to construct timer
This commit is contained in:
parent
f1566ed4c6
commit
88673f3f85
Notes:
sideshowbarker
2024-07-19 05:42:00 +09:00
Author: https://github.com/kevmeyer Commit: https://github.com/SerenityOS/serenity/commit/88673f3f855 Pull-request: https://github.com/SerenityOS/serenity/pull/2549
1 changed files with 1 additions and 6 deletions
|
@ -93,12 +93,7 @@ public:
|
|||
add_child(socket);
|
||||
m_socket->on_ready_to_read = [this] { drain_messages_from_client(); };
|
||||
|
||||
m_responsiveness_timer = Core::Timer::construct();
|
||||
m_responsiveness_timer->set_single_shot(true);
|
||||
m_responsiveness_timer->set_interval(3000);
|
||||
m_responsiveness_timer->on_timeout = [this] {
|
||||
may_have_become_unresponsive();
|
||||
};
|
||||
m_responsiveness_timer = Core::Timer::create_single_shot(3000, [this] { may_have_become_unresponsive(); });
|
||||
}
|
||||
|
||||
virtual ~ClientConnection() override
|
||||
|
|
Loading…
Reference in a new issue