1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +00:00

LibIPC: Use create_single_shot to construct timer

This commit is contained in:
Kevin Meyer 2020-06-12 18:18:57 +02:00 committed by Andreas Kling
parent f1566ed4c6
commit 88673f3f85

View file

@ -93,12 +93,7 @@ public:
add_child(socket); add_child(socket);
m_socket->on_ready_to_read = [this] { drain_messages_from_client(); }; m_socket->on_ready_to_read = [this] { drain_messages_from_client(); };
m_responsiveness_timer = Core::Timer::construct(); m_responsiveness_timer = Core::Timer::create_single_shot(3000, [this] { may_have_become_unresponsive(); });
m_responsiveness_timer->set_single_shot(true);
m_responsiveness_timer->set_interval(3000);
m_responsiveness_timer->on_timeout = [this] {
may_have_become_unresponsive();
};
} }
virtual ~ClientConnection() override virtual ~ClientConnection() override