mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-04-25 19:59:02 +02:00
Add a kernel crash function, add a timer using the timer interrupt and
set PIT interval to 1000hz, use a vector inside Framebuffer, remove without_interrupts from the framebuffer and serial console, move to usize on primitives, add date at boot and turn on multithreading, add a boot animation and add a test_performance function with the new timer
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::{driver::timer::TIMER, println};
|
||||
use spin::{Mutex, MutexGuard};
|
||||
|
||||
pub struct LinkedNode {
|
||||
@@ -34,3 +35,10 @@ impl<A> Locked<A> {
|
||||
self.inner.lock()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn test_performance<F: FnOnce()>(function: F) {
|
||||
let start = TIMER.now();
|
||||
let ret = function();
|
||||
println!("took {} ms", (TIMER.now() - start).elapsed());
|
||||
ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user