diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-11-29 16:37:07 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-11-29 17:01:36 +0100 |
| commit | 4634316749c41dd5d8cc2f316033c9098369ed2f (patch) | |
| tree | 1992bf003d6afcdeae926db2308f369bccfc42ea /embassy-time/src/timer.rs | |
| parent | 1b9925e3da0ec42b770f736cd22325203c97cb47 (diff) | |
Update embedded-(hal,io,nal).
Diffstat (limited to 'embassy-time/src/timer.rs')
| -rw-r--r-- | embassy-time/src/timer.rs | 9 |
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())`. |
