Skip to content
Snippets Groups Projects
Commit a6897afb authored by Anton's avatar Anton
Browse files

bare3_3

parent cb845c5d
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@
#![no_main]
#![no_std]
use core::time::Duration;
use cortex_m_semihosting::hprintln;
use panic_semihosting as _;
use rtic::cyccnt::Instant;
......@@ -28,7 +30,8 @@ const APP: () = {
// notice all printing outside of the section to measure!
hprintln!("Start {:?}", start).ok();
hprintln!("End {:?}", end).ok();
// hprintln!("Diff {:?}", (end - start) ).ok();
let diff = Instant::duration_since(&end,start);
hprintln!("Diff {:?}", diff.as_cycles()).ok();
}
};
......@@ -76,7 +79,8 @@ fn wait(i: u32) {
//
// What is now the output in the Adapter Output console?
//
// ** your answer here **
// Start Instant(2694714472)
// End Instant(2698714489)
//
// Commit your answers (bare3_1)
//
......@@ -86,7 +90,9 @@ fn wait(i: u32) {
//
// What is now the output in the Adapter Output console?
//
// ** your answer here **
// Start Instant(20606036)
// End Instant(24606052)
// Diff 4000016
//
// Commit your answers (bare3_2)
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment