Re: [PATCH v9 6/7] rust: time: Add Instant::from_ktime()
From: FUJITA Tomonori
Date: Thu Aug 21 2025 - 19:10:54 EST
On Thu, 21 Aug 2025 15:32:46 -0400
Lyude Paul <lyude@xxxxxxxxxx> wrote:
> For implementing Rust bindings which can return a point in time.
>
> Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
>
> ---
> V4:
> * Turn from_nanos() into an unsafe function in order to ensure that we
> uphold the invariants of Instant
> V5:
> * Add debug_assert!() to from_nanos
> V8:
> * Change name of function from Instant::from_nanos() to
> Instant::from_ktime()
> V9:
> * Fix outdated comments in from_ktime (nanos -> ktime)
>
> rust/kernel/time.rs | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Reviewed-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>
Thanks!