aboutsummaryrefslogtreecommitdiff
path: root/embassy-time/src
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-time/src')
-rw-r--r--embassy-time/src/driver.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-time/src/driver.rs b/embassy-time/src/driver.rs
index 5fe7becaf..81ee1b0f5 100644
--- a/embassy-time/src/driver.rs
+++ b/embassy-time/src/driver.rs
@@ -108,6 +108,10 @@ pub trait Driver: Send + Sync + 'static {
108 /// The `Driver` implementation should guarantee that the alarm callback is never called synchronously from `set_alarm`. 108 /// The `Driver` implementation should guarantee that the alarm callback is never called synchronously from `set_alarm`.
109 /// Rather - if `timestamp` is already in the past - `false` should be returned and alarm should not be set, 109 /// Rather - if `timestamp` is already in the past - `false` should be returned and alarm should not be set,
110 /// or alternatively, the driver should return `true` and arrange to call the alarm callback as soon as possible, but not synchronously. 110 /// or alternatively, the driver should return `true` and arrange to call the alarm callback as soon as possible, but not synchronously.
111 /// There is a rare third possibility that the alarm was barely in the future, and by the time it was enabled, it had slipped into the
112 /// past. This is can be detected by double-checking that the alarm is still in the future after enabling it; if it isn't, `false`
113 /// should also be returned to indicate that the callback may have been called already by the alarm, but it is not guaranteed, so the
114 /// caller should also call the callback, just like in the more common `false` case. (Note: This requires idempotency of the callback.)
111 /// 115 ///
112 /// When callback is called, it is guaranteed that now() will return a value greater or equal than timestamp. 116 /// When callback is called, it is guaranteed that now() will return a value greater or equal than timestamp.
113 /// 117 ///