1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:57:49 +00:00

AK: Rename Time to Duration

That's what this class really is; in fact that's what the first line of
the comment says it is.

This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
This commit is contained in:
kleines Filmröllchen 2023-03-13 16:30:34 +01:00 committed by Jelle Raaijmakers
parent 82ddc813d5
commit 213025f210
140 changed files with 634 additions and 628 deletions

View file

@ -79,7 +79,7 @@ public:
virtual bool is_local() const { return false; }
virtual bool is_ipv4() const { return false; }
virtual ErrorOr<size_t> sendto(OpenFileDescription&, UserOrKernelBuffer const&, size_t, int flags, Userspace<sockaddr const*>, socklen_t) = 0;
virtual ErrorOr<size_t> recvfrom(OpenFileDescription&, UserOrKernelBuffer&, size_t, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>, Time&, bool blocking) = 0;
virtual ErrorOr<size_t> recvfrom(OpenFileDescription&, UserOrKernelBuffer&, size_t, int flags, Userspace<sockaddr*>, Userspace<socklen_t*>, Duration&, bool blocking) = 0;
virtual ErrorOr<void> setsockopt(int level, int option, Userspace<void const*>, socklen_t);
virtual ErrorOr<void> getsockopt(OpenFileDescription&, int level, int option, Userspace<void*>, Userspace<socklen_t*>);
@ -100,11 +100,11 @@ public:
virtual ErrorOr<struct stat> stat() const override;
virtual ErrorOr<NonnullOwnPtr<KString>> pseudo_path(OpenFileDescription const&) const override = 0;
bool has_receive_timeout() const { return m_receive_timeout != Time::zero(); }
Time const& receive_timeout() const { return m_receive_timeout; }
bool has_receive_timeout() const { return m_receive_timeout != Duration::zero(); }
Duration const& receive_timeout() const { return m_receive_timeout; }
bool has_send_timeout() const { return m_send_timeout != Time::zero(); }
Time const& send_timeout() const { return m_send_timeout; }
bool has_send_timeout() const { return m_send_timeout != Duration::zero(); }
Duration const& send_timeout() const { return m_send_timeout; }
bool wants_timestamp() const { return m_timestamp; }
@ -173,8 +173,8 @@ private:
SpinlockProtected<RefPtr<NetworkAdapter>, LockRank::None> m_bound_interface;
Time m_receive_timeout {};
Time m_send_timeout {};
Duration m_receive_timeout {};
Duration m_send_timeout {};
int m_timestamp { 0 };
SpinlockProtected<Optional<ErrnoCode>, LockRank::None> m_so_error;