aboutsummaryrefslogtreecommitdiff
path: root/examples/baseline.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-10-15 18:44:49 -0500
committerJorge Aparicio <jorge@japaric.io>2019-10-15 18:44:49 -0500
commiteef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63 (patch)
tree1d2a7d49ce5443fcc06ab7cad39c7c8907789a70 /examples/baseline.rs
parent6196984d6d75be987d3dec3bf17909e3cd40c15b (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/baseline.rs')
-rw-r--r--examples/baseline.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/baseline.rs b/examples/baseline.rs
index b7144dd..df0ff9a 100644
--- a/examples/baseline.rs
+++ b/examples/baseline.rs
@@ -14,6 +14,8 @@ use panic_semihosting as _;
const APP: () = {
#[init(spawn = [foo])]
fn init(cx: init::Context) {
+ // omitted: initialization of `CYCCNT`
+
hprintln!("init(baseline = {:?})", cx.start).unwrap();
// `foo` inherits the baseline of `init`: `Instant(0)`