diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2019-10-15 18:44:49 -0500 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2019-10-15 18:44:49 -0500 |
| commit | eef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63 (patch) | |
| tree | 1d2a7d49ce5443fcc06ab7cad39c7c8907789a70 /examples/periodic.rs | |
| parent | 6196984d6d75be987d3dec3bf17909e3cd40c15b (diff) | |
more monotonic timer docs
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
Diffstat (limited to 'examples/periodic.rs')
| -rw-r--r-- | examples/periodic.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/periodic.rs b/examples/periodic.rs index ec110e1..dca0ad5 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -16,6 +16,8 @@ const PERIOD: u32 = 8_000_000; const APP: () = { #[init(schedule = [foo])] fn init(cx: init::Context) { + // omitted: initialization of `CYCCNT` + cx.schedule.foo(Instant::now() + PERIOD.cycles()).unwrap(); } |
