aboutsummaryrefslogtreecommitdiff
path: root/embassy-time/src/timer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-time/src/timer.rs')
-rw-r--r--embassy-time/src/timer.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs
index d3f1e1621..54bb9b6d8 100644
--- a/embassy-time/src/timer.rs
+++ b/embassy-time/src/timer.rs
@@ -66,6 +66,8 @@ impl<F: Future> WithTimeout for F {
66 66
67/// Future for the [`with_timeout`] and [`with_deadline`] functions. 67/// Future for the [`with_timeout`] and [`with_deadline`] functions.
68#[must_use = "futures do nothing unless you `.await` or poll them"] 68#[must_use = "futures do nothing unless you `.await` or poll them"]
69#[derive(Debug)]
70#[cfg_attr(feature = "defmt", derive(defmt::Format))]
69pub struct TimeoutFuture<F> { 71pub struct TimeoutFuture<F> {
70 timer: Timer, 72 timer: Timer,
71 fut: F, 73 fut: F,
@@ -92,6 +94,8 @@ impl<F: Future> Future for TimeoutFuture<F> {
92 94
93/// A future that completes at a specified [Instant](struct.Instant.html). 95/// A future that completes at a specified [Instant](struct.Instant.html).
94#[must_use = "futures do nothing unless you `.await` or poll them"] 96#[must_use = "futures do nothing unless you `.await` or poll them"]
97#[derive(Debug)]
98#[cfg_attr(feature = "defmt", derive(defmt::Format))]
95pub struct Timer { 99pub struct Timer {
96 expires_at: Instant, 100 expires_at: Instant,
97 yielded_once: bool, 101 yielded_once: bool,
@@ -227,6 +231,8 @@ impl Future for Timer {
227/// ## Cancel safety 231/// ## Cancel safety
228/// It is safe to cancel waiting for the next tick, 232/// It is safe to cancel waiting for the next tick,
229/// meaning no tick is lost if the Future is dropped. 233/// meaning no tick is lost if the Future is dropped.
234#[derive(Debug)]
235#[cfg_attr(feature = "defmt", derive(defmt::Format))]
230pub struct Ticker { 236pub struct Ticker {
231 expires_at: Instant, 237 expires_at: Instant,
232 duration: Duration, 238 duration: Duration,