diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-03-31 20:23:30 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-31 20:23:30 +0000 |
| commit | 0549dd5fd7d874f4f071047db12702f58009931b (patch) | |
| tree | f176ab269949d26f48e04c950cebc5489bae8c56 | |
| parent | 6634cc90bcd3eb25b64712688920f383584b2964 (diff) | |
| parent | 67c9cc2c4b886e6962ecdd6eff8794b14c1accdc (diff) | |
Merge pull request #2756 from Frostie314159/ticker_send_sync
Made `Ticker::next` `Send+Sync`.
| -rw-r--r-- | embassy-time/src/timer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs index d6d0a46e2..757c3ff00 100644 --- a/embassy-time/src/timer.rs +++ b/embassy-time/src/timer.rs | |||
| @@ -203,7 +203,7 @@ impl Ticker { | |||
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | /// Waits for the next tick. | 205 | /// Waits for the next tick. |
| 206 | pub fn next(&mut self) -> impl Future<Output = ()> + '_ { | 206 | pub fn next(&mut self) -> impl Future<Output = ()> + Send + Sync + '_ { |
| 207 | poll_fn(|cx| { | 207 | poll_fn(|cx| { |
| 208 | if self.expires_at <= Instant::now() { | 208 | if self.expires_at <= Instant::now() { |
| 209 | let dur = self.duration; | 209 | let dur = self.duration; |
