aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/timer-queue.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-16 19:07:28 +0000
committerGitHub <noreply@github.com>2019-10-16 19:07:28 +0000
commit47e4d999072ade9447616a91fbce61561810c75b (patch)
tree8f5a1dbf40bcedd583a9fd51404b2ace1b823fb7 /book/en/src/by-example/timer-queue.md
parent8a1f009c34b8cad3f7478aa67432fc60d47be4c0 (diff)
parent1ccacf2102fb306867c0afb35d6d5dab43f75baf (diff)
Merge #255
255: more monotonic timer docs r=nils-grepit a=japaric covers - initialization and configuration of the timer; this is now a responsibility of the application author - correctness of `Monotonic::now()` in `#[init]` - safety of `Monotonic::reset()` closes #251 cc @jonas-schievink (EDIT: yay, pull request number 0xFF) Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'book/en/src/by-example/timer-queue.md')
-rw-r--r--book/en/src/by-example/timer-queue.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/book/en/src/by-example/timer-queue.md b/book/en/src/by-example/timer-queue.md
index 7c8be38..94d2281 100644
--- a/book/en/src/by-example/timer-queue.md
+++ b/book/en/src/by-example/timer-queue.md
@@ -34,6 +34,10 @@ first appear in the `schedule` argument of the context attribute. When
scheduling a task the (user-defined) `Instant` at which the task should be
executed must be passed as the first argument of the `schedule` invocation.
+Additionally, the chosen `monotonic` timer must be configured and initialized
+during the `#[init]` phase. Note that this is *also* the case if you choose to
+use the `CYCCNT` provided by the `cortex-m-rtfm` crate.
+
The example below schedules two tasks from `init`: `foo` and `bar`. `foo` is
scheduled to run 8 million clock cycles in the future. Next, `bar` is scheduled
to run 4 million clock cycles in the future. Thus `bar` runs before `foo` since