Commit ad8e5ae4 authored by last-las's avatar last-las
Browse files

add test case in user space for print speed

Showing with 21 additions and 0 deletions
+21 -0
#![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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment