aboutsummaryrefslogtreecommitdiff
path: root/examples/schedule.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2020-01-21 22:23:20 +0100
committerGravatar Jorge Aparicio <jorge@japaric.io> 2020-01-21 22:23:20 +0100
commitb04103f6df712233b7659f2a845461f4db682e32 (patch)
tree9e190b25b18e2897bffa5bc39d577b1f19493c75 /examples/schedule.rs
parent6b0a2df41c024fa8e7da07f3b42a80f19840432e (diff)
downloadrtic-b04103f6df712233b7659f2a845461f4db682e32.tar.gz
rtic-b04103f6df712233b7659f2a845461f4db682e32.tar.zst
rtic-b04103f6df712233b7659f2a845461f4db682e32.zip
docs: do not use Instant::now in #[init]
Diffstat (limited to 'examples/schedule.rs')
-rw-r--r--examples/schedule.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/schedule.rs b/examples/schedule.rs
index 97818e36..a1c41ca5 100644
--- a/examples/schedule.rs
+++ b/examples/schedule.rs
@@ -20,6 +20,7 @@ const APP: () = {
cx.core.DWT.enable_cycle_counter();
// semantically, the monotonic timer is frozen at time "zero" during `init`
+ // NOTE do *not* call `Instant::now` in this context; it will return a nonsense value
let now = cx.start; // the start time of the system
hprintln!("init @ {:?}", now).unwrap();