mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
Kernel: Make sockets use AK::Time
This commit is contained in:
parent
719cb93a1a
commit
5c15ca7b84
Notes:
sideshowbarker
2024-07-18 21:47:24 +09:00
Author: https://github.com/BenWiederhake
Commit: 5c15ca7b84
Pull-request: https://github.com/SerenityOS/serenity/pull/5323
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bgianfo
13 changed files with 54 additions and 53 deletions
|
@ -285,8 +285,7 @@ auto Thread::WriteBlocker::override_timeout(const BlockTimeout& timeout) -> cons
|
|||
if (description.is_socket()) {
|
||||
auto& socket = *description.socket();
|
||||
if (socket.has_send_timeout()) {
|
||||
// FIXME: Should use AK::Time internally
|
||||
Time send_timeout = Time::from_timeval(socket.send_timeout());
|
||||
Time send_timeout = socket.send_timeout();
|
||||
m_timeout = BlockTimeout(false, &send_timeout, timeout.start_time(), timeout.clock_id());
|
||||
if (timeout.is_infinite() || (!m_timeout.is_infinite() && m_timeout.absolute_time() < timeout.absolute_time()))
|
||||
return m_timeout;
|
||||
|
@ -306,8 +305,7 @@ auto Thread::ReadBlocker::override_timeout(const BlockTimeout& timeout) -> const
|
|||
if (description.is_socket()) {
|
||||
auto& socket = *description.socket();
|
||||
if (socket.has_receive_timeout()) {
|
||||
// FIXME: Should use AK::Time internally
|
||||
Time receive_timeout = Time::from_timeval(socket.receive_timeout());
|
||||
Time receive_timeout = socket.receive_timeout();
|
||||
m_timeout = BlockTimeout(false, &receive_timeout, timeout.start_time(), timeout.clock_id());
|
||||
if (timeout.is_infinite() || (!m_timeout.is_infinite() && m_timeout.absolute_time() < timeout.absolute_time()))
|
||||
return m_timeout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue