aboutsummaryrefslogtreecommitdiff
path: root/embassy-time/src
diff options
context:
space:
mode:
authorFrostie314159 <[email protected]>2024-03-22 08:50:56 +0100
committerFrostie314159 <[email protected]>2024-03-28 19:41:50 +0100
commit2ea1040e073a54d2a97f75c7d68d0d9a230d15c8 (patch)
treeb39532e6b346e32ddcf1fbafbaa67ad4958b0302 /embassy-time/src
parent7efe8e0005ca75c3753081848e8b176f8ac3a9ba (diff)
Adjusted behavior.
Diffstat (limited to 'embassy-time/src')
-rw-r--r--embassy-time/src/timer.rs4
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.