Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
e7020e_2021
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton Johansson
e7020e_2021
Commits
a6897afb
Commit
a6897afb
authored
4 years ago
by
Anton
Browse files
Options
Downloads
Patches
Plain Diff
bare3_3
parent
cb845c5d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/rtic_bare3.rs
+9
-3
9 additions, 3 deletions
examples/rtic_bare3.rs
with
9 additions
and
3 deletions
examples/rtic_bare3.rs
+
9
−
3
View file @
a6897afb
...
...
@@ -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)
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment