MCPcopy Create free account
hub / github.com/KernelErr/MoeOS / init

Function init

src/timer.rs:9–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const TICKS_PER_SEC: usize = 1000;
8
9pub fn init() {
10 unsafe {
11 if CLOCK_FREQ == 0 {
12 panic!("Clock frequency is zero!");
13 }
14 }
15 unsafe {
16 sie::set_stimer();
17 }
18 info!("Timer ready");
19 timer_next_triger();
20}
21
22pub fn get_time_us() -> usize {
23 unsafe {

Callers

nothing calls this directly

Calls 1

timer_next_trigerFunction · 0.85

Tested by

no test coverage detected