Subject: Re: [PATCH v11 2/8] rust: time: Add PartialEq/Eq/PartialOrd/Ord trait to Ktime

From: Andreas Hindborg <[email-masked]>
Date: Sat, 22 Mar 2025 09:51:30 +0100

FUJITA Tomonori <[email-masked]> writes:

> Add PartialEq/Eq/PartialOrd/Ord trait to Ktime so two Ktime instances
> can be compared to determine whether a timeout is met or not.
>
> Use the derive implements; we directly touch C's ktime_t rather than
> using the C's accessors because it is more efficient and we already do
> in the existing code (Ktime::sub).
>
> Tested-by: Daniel Almeida <[email-masked]>
> Reviewed-by: Trevor Gross <[email-masked]>
> Reviewed-by: Alice Ryhl <[email-masked]>
> Reviewed-by: Gary Guo <[email-masked]>
> Reviewed-by: Fiona Behrens <[email-masked]>
> Signed-off-by: FUJITA Tomonori <[email-masked]>

Reviewed-by: Andreas Hindborg <[email-masked]>

Best regards,
Andreas Hindborg