aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Greig <[email protected]>2023-10-15 00:45:42 +0100
committerAdam Greig <[email protected]>2023-10-15 00:47:56 +0100
commit7559f9e5834799b041d899767ef4305dcfdf0181 (patch)
tree7c94db16968031098af5dd0e4ea94f732fd08cd8
parentc8fdbe19f91a02b86008c73ba021d8e7d2f4986b (diff)
time: Update documentation to use new after_x convenience methods
-rw-r--r--README.md4
-rw-r--r--docs/modules/ROOT/pages/runtime.adoc2
-rw-r--r--embassy-executor/README.md2
3 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index c4c01dfbc..e5a970621 100644
--- a/README.md
+++ b/README.md
@@ -62,9 +62,9 @@ async fn blink(pin: AnyPin) {
62 loop { 62 loop {
63 // Timekeeping is globally available, no need to mess with hardware timers. 63 // Timekeeping is globally available, no need to mess with hardware timers.
64 led.set_high(); 64 led.set_high();
65 Timer::after(Duration::from_millis(150)).await; 65 Timer::after_millis(150).await;
66 led.set_low(); 66 led.set_low();
67 Timer::after(Duration::from_millis(150)).await; 67 Timer::after_millis(150).await;
68 } 68 }
69} 69}
70 70
diff --git a/docs/modules/ROOT/pages/runtime.adoc b/docs/modules/ROOT/pages/runtime.adoc
index cb8afef29..8f4921f67 100644
--- a/docs/modules/ROOT/pages/runtime.adoc
+++ b/docs/modules/ROOT/pages/runtime.adoc
@@ -6,7 +6,7 @@ The Embassy executor is an async/await executor designed for embedded usage alon
6 6
7* No `alloc`, no heap needed. Task are statically allocated. 7* No `alloc`, no heap needed. Task are statically allocated.
8* No "fixed capacity" data structures, executor works with 1 or 1000 tasks without needing config/tuning. 8* No "fixed capacity" data structures, executor works with 1 or 1000 tasks without needing config/tuning.
9* Integrated timer queue: sleeping is easy, just do `Timer::after(Duration::from_secs(1)).await;`. 9* Integrated timer queue: sleeping is easy, just do `Timer::after_secs(1).await;`.
10* No busy-loop polling: CPU sleeps when there's no work to do, using interrupts or `WFE/SEV`. 10* No busy-loop polling: CPU sleeps when there's no work to do, using interrupts or `WFE/SEV`.
11* Efficient polling: a wake will only poll the woken task, not all of them. 11* Efficient polling: a wake will only poll the woken task, not all of them.
12* Fair: a task can't monopolize CPU time even if it's constantly being woken. All other tasks get a chance to run before a given task gets polled for the second time. 12* Fair: a task can't monopolize CPU time even if it's constantly being woken. All other tasks get a chance to run before a given task gets polled for the second time.
diff --git a/embassy-executor/README.md b/embassy-executor/README.md
index 47d0cb8a2..3c1448a18 100644
--- a/embassy-executor/README.md
+++ b/embassy-executor/README.md
@@ -4,7 +4,7 @@ An async/await executor designed for embedded usage.
4 4
5- No `alloc`, no heap needed. Task futures are statically allocated. 5- No `alloc`, no heap needed. Task futures are statically allocated.
6- No "fixed capacity" data structures, executor works with 1 or 1000 tasks without needing config/tuning. 6- No "fixed capacity" data structures, executor works with 1 or 1000 tasks without needing config/tuning.
7- Integrated timer queue: sleeping is easy, just do `Timer::after(Duration::from_secs(1)).await;`. 7- Integrated timer queue: sleeping is easy, just do `Timer::after_secs(1).await;`.
8- No busy-loop polling: CPU sleeps when there's no work to do, using interrupts or `WFE/SEV`. 8- No busy-loop polling: CPU sleeps when there's no work to do, using interrupts or `WFE/SEV`.
9- Efficient polling: a wake will only poll the woken task, not all of them. 9- Efficient polling: a wake will only poll the woken task, not all of them.
10- Fair: a task can't monopolize CPU time even if it's constantly being woken. All other tasks get a chance to run before a given task gets polled for the second time. 10- Fair: a task can't monopolize CPU time even if it's constantly being woken. All other tasks get a chance to run before a given task gets polled for the second time.