Skip to content
Snippets Groups Projects
Commit f730dce4 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Daniel Almeida
Browse files

rust: time: Add PartialEq/Eq/PartialOrd/Ord trait to Ktime


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).

Reviewed-by: default avatarTrevor Gross <tmgross@umich.edu>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarGary Guo <gary@garyguo.net>
Reviewed-by: default avatarFiona Behrens <me@kloenk.dev>
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@gmail.com>
parent 82ad3d49
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment