diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-11-09 10:15:11 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-09 10:15:11 +0000 |
| commit | b4929032d5f013985becb88faf9b847236afe172 (patch) | |
| tree | bbdd1ccb6ebda2e4be8362709a8188ae1bed895a /examples/common.rs | |
| parent | 4f3c5baf49bde675dfa8faf6e5311d38cbb5d654 (diff) | |
| parent | 5ab5112271a9dbef6d875ad89706fc726e126b95 (diff) | |
Merge #547
547: New monotonic trait r=AfoHT a=korken89
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'examples/common.rs')
| -rw-r--r-- | examples/common.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/common.rs b/examples/common.rs index 770a0ae..26a5c8f 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 |
