diff options
| author | Ismo Puustinen <[email protected]> | 2025-12-05 23:21:19 +0200 |
|---|---|---|
| committer | Ismo Puustinen <[email protected]> | 2025-12-05 23:24:37 +0200 |
| commit | 3c3d3ccab05fdb80d3b01e2d08f02fe9741483bc (patch) | |
| tree | 323a45a03faccf4c39cb9aafb1883a98dd5e4f3e /embassy-time | |
| parent | a382238225ea55ee478bbde9ddb7d0d37cf004b5 (diff) | |
Fix API documentation for Ticker reset_at() function
The documentation indicated reset_at() would fire immediately if the
deadline is in the past. However, if the duration is further in the
future than the deadline is in the past, the ticker won't fire
immediately but just before the next scheduled tick.
Diffstat (limited to 'embassy-time')
| -rw-r--r-- | embassy-time/src/timer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs index 2f5967c63..e6d1aed84 100644 --- a/embassy-time/src/timer.rs +++ b/embassy-time/src/timer.rs | |||
| @@ -253,7 +253,7 @@ impl Ticker { | |||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | /// Reset the ticker at the deadline. | 255 | /// Reset the ticker at the deadline. |
| 256 | /// If the deadline is in the past, the ticker will fire instantly. | 256 | /// If the deadline is in the past, the ticker will fire before the next scheduled tick. |
| 257 | pub fn reset_at(&mut self, deadline: Instant) { | 257 | pub fn reset_at(&mut self, deadline: Instant) { |
| 258 | self.expires_at = deadline + self.duration; | 258 | self.expires_at = deadline + self.duration; |
| 259 | } | 259 | } |
