diff options
| -rw-r--r-- | embassy-time/src/timer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs index 763bfdeeb..d6d0a46e2 100644 --- a/embassy-time/src/timer.rs +++ b/embassy-time/src/timer.rs | |||
| @@ -190,10 +190,10 @@ impl Ticker { | |||
| 190 | self.expires_at = Instant::now() + self.duration; | 190 | self.expires_at = Instant::now() + self.duration; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | /// Reset the ticker to fire for the next time on the deadline. | 193 | /// Reset the ticker at the deadline. |
| 194 | /// If the deadline is in the past, the ticker will fire instantly. | 194 | /// If the deadline is in the past, the ticker will fire instantly. |
| 195 | pub fn reset_at(&mut self, deadline: Instant) { | 195 | pub fn reset_at(&mut self, deadline: Instant) { |
| 196 | self.expires_at = deadline; | 196 | self.expires_at = deadline + self.duration; |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | /// Resets the ticker, after the specified duration has passed. | 199 | /// Resets the ticker, after the specified duration has passed. |
