-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add print! and println! macro & add timestamp to kprintln!
+ print! and println! macro print on vga_buffer without timestamp + kprint! macro print on vga_buffer with timestamp (mimic dmesg)
- Loading branch information
Showing
11 changed files
with
116 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
use crate::alloc::string::String; | ||
use crate::alloc::vec::Vec; | ||
|
||
use crate::println; | ||
|
||
pub fn jiffies(_: Vec<String>) { | ||
crate::kprintln!("Jiffies: {}", crate::time::jiffies()); | ||
println!("Jiffies: {}", crate::time::jiffies()); | ||
} | ||
|
||
pub fn uptime(_: Vec<String>) { | ||
let time = crate::time::get_timestamp(); | ||
crate::kprintln!( | ||
println!( | ||
"Time elapsed since boot: {}s {}ms", | ||
time.second, | ||
time.millisecond | ||
time.second, time.millisecond | ||
); | ||
} | ||
|
||
pub fn date(_: Vec<String>) { | ||
crate::kprintln!("{}", crate::cmos::get_time()); | ||
println!("{}", crate::cmos::get_time()); | ||
} |
Oops, something went wrong.