From 3c3d3ccab05fdb80d3b01e2d08f02fe9741483bc Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Fri, 5 Dec 2025 23:21:19 +0200 Subject: 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. --- embassy-time/src/timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'embassy-time') 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 { } /// Reset the ticker at the deadline. - /// If the deadline is in the past, the ticker will fire instantly. + /// If the deadline is in the past, the ticker will fire before the next scheduled tick. pub fn reset_at(&mut self, deadline: Instant) { self.expires_at = deadline + self.duration; } -- cgit