aboutsummaryrefslogtreecommitdiff
path: root/examples/common.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2021-10-31 10:09:40 +0100
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2021-11-09 10:20:43 +0100
commit0dcb0c4e497b23bf68b7ac0d3d918ab3d3c209be (patch)
treefa4dd3f228dd643d0a989aaae512bf33bc90c291 /examples/common.rs
parentae034aec14bf44e83e2720c81b98031d38992133 (diff)
downloadrtic-0dcb0c4e497b23bf68b7ac0d3d918ab3d3c209be.tar.gz
rtic-0dcb0c4e497b23bf68b7ac0d3d918ab3d3c209be.tar.zst
rtic-0dcb0c4e497b23bf68b7ac0d3d918ab3d3c209be.zip
New monotonic trait working
Diffstat (limited to 'examples/common.rs')
-rw-r--r--examples/common.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/common.rs b/examples/common.rs
index 770a0ae5..26a5c8fb 100644
--- a/examples/common.rs
+++ b/examples/common.rs
@@ -10,8 +10,7 @@ use panic_semihosting as _;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0, QEI0])]
mod app {
use cortex_m_semihosting::{debug, hprintln};
- use rtic::time::duration::*;
- use systick_monotonic::Systick; // Implements the `Monotonic` trait // Time helpers, such as `N.seconds()`
+ use systick_monotonic::*; // Implements the `Monotonic` trait
// A monotonic timer to enable scheduling in RTIC
#[monotonic(binds = SysTick, default = true)]
@@ -41,7 +40,7 @@ mod app {
// Spawn the task `bar` 1 second after `init` finishes, this is enabled
// by the `#[monotonic(..)]` above
- bar::spawn_after(1.seconds()).unwrap();
+ bar::spawn_after(1.secs()).unwrap();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
@@ -83,7 +82,7 @@ mod app {
hprintln!("bar").ok();
// Run `bar` once per second
- bar::spawn_after(1.seconds()).unwrap();
+ bar::spawn_after(1.secs()).unwrap();
}
// Hardware task, bound to a hardware interrupt