Thread (32 messages) 32 messages, 6 authors, 2025-02-01

Re: [PATCH v9 4/8] rust: time: Introduce Instant type

From: Gary Guo <gary@garyguo.net>
Date: 2025-01-27 03:31:12
Also in: lkml, rust-for-linux

On Sat, 25 Jan 2025 19:18:49 +0900
FUJITA Tomonori [off-list ref] wrote:
Introduce a type representing a specific point in time. We could use
the Ktime type but C's ktime_t is used for both timestamp and
timedelta. To avoid confusion, introduce a new Instant type for
timestamp.

Rename Ktime to Instant and modify their methods for timestamp.

Implement the subtraction operator for Instant:

Delta = Instant A - Instant B

Reviewed-by: Boqun Feng <redacted>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
---
 rust/kernel/time.rs | 77 +++++++++++++++++++++++----------------------
 1 file changed, 39 insertions(+), 38 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help