Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
破败王者之剑
OSKernel2022-LOS
Commits
ad8e5ae4
Commit
ad8e5ae4
authored
3 years ago
by
last-las
Browse files
Options
Download
Patches
Plain Diff
add test case in user space for print speed
parent
d1837650
game
driver_dev
fat32_dev
heap_dev
k210_dev
master
match
test_oskernel
vfs_dev
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
user/lib/src/bin/13speed.rs
+21
-0
user/lib/src/bin/13speed.rs
with
21 additions
and
0 deletions
+21
-0
user/lib/src/bin/13speed.rs
0 → 100644
+
21
−
0
View file @
ad8e5ae4
#![no_std]
#![no_main]
#[macro_use]
extern
crate
user_lib
;
use
user_lib
::
syscall
::
get_time
;
const
SENTENCE
:
&
str
=
"The big brother is watching you!"
;
// const SENTENCE: &str = "B";
const
TIMES
:
usize
=
32
;
#[no_mangle]
fn
main
()
{
let
start
=
get_time
();
for
_
in
0
..
TIMES
{
println!
(
"{}"
,
SENTENCE
);
}
let
end
=
get_time
();
println!
(
"Gap after print {} times: {}"
,
TIMES
,
end
-
start
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets