diff options
Diffstat (limited to 'rust/kernel/time.rs')
-rw-r--r-- | rust/kernel/time.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/kernel/time.rs b/rust/kernel/time.rs index 1be5ecd814d3..5a9ca0d3b7d4 100644 --- a/rust/kernel/time.rs +++ b/rust/kernel/time.rs @@ -194,6 +194,11 @@ impl<C: ClockSource> Instant<C> { pub fn elapsed(&self) -> Delta { Self::now() - *self } + + #[inline] + pub(crate) fn as_nanos(&self) -> i64 { + self.inner + } } impl<C: ClockSource> core::ops::Sub for Instant<C> { |