aboutsummaryrefslogtreecommitdiff
path: root/embassy-time/src/timer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-time/src/timer.rs')
-rw-r--r--embassy-time/src/timer.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs
index ee2423daf..574d715da 100644
--- a/embassy-time/src/timer.rs
+++ b/embassy-time/src/timer.rs
@@ -74,6 +74,15 @@ impl Timer {
74 Self::after(Duration::from_ticks(ticks)) 74 Self::after(Duration::from_ticks(ticks))
75 } 75 }
76 76
77 /// Expire after the specified number of nanoseconds.
78 ///
79 /// This method is a convenience wrapper for calling `Timer::after(Duration::from_nanos())`.
80 /// For more details, refer to [`Timer::after()`] and [`Duration::from_nanos()`].
81 #[inline]
82 pub fn after_nanos(nanos: u64) -> Self {
83 Self::after(Duration::from_nanos(nanos))
84 }
85
77 /// Expire after the specified number of microseconds. 86 /// Expire after the specified number of microseconds.
78 /// 87 ///
79 /// This method is a convenience wrapper for calling `Timer::after(Duration::from_micros())`. 88 /// This method is a convenience wrapper for calling `Timer::after(Duration::from_micros())`.