Skip to content

Commit 69f66cf

Browse files
fujitaAndreas Hindborg
authored andcommitted
rust: time: Remove Ktime in hrtimer
Remove the use of `Ktime` from the hrtimer code, which was originally introduced as a temporary workaround. The hrtimer has now been fully converted to use the `Instant` and `Delta` types instead. Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Link: https://lore.kernel.org/r/20250610132823.3457263-6-fujita.tomonori@gmail.com Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
1 parent e0c0ab0 commit 69f66cf

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

rust/kernel/time/hrtimer.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,6 @@ use crate::{prelude::*, types::Opaque};
7272
use core::marker::PhantomData;
7373
use pin_init::PinInit;
7474

75-
/// A Rust wrapper around a `ktime_t`.
76-
// NOTE: Ktime is going to be removed when hrtimer is converted to Instant/Delta.
77-
#[repr(transparent)]
78-
#[derive(Copy, Clone, PartialEq, PartialOrd, Eq, Ord)]
79-
pub struct Ktime {
80-
inner: bindings::ktime_t,
81-
}
82-
83-
impl Ktime {
84-
/// Returns the number of nanoseconds.
85-
#[inline]
86-
pub fn to_ns(self) -> i64 {
87-
self.inner
88-
}
89-
}
90-
9175
/// A timer backed by a C `struct hrtimer`.
9276
///
9377
/// # Invariants

0 commit comments

Comments
 (0)