diff --git a/zion/interrupt/interrupt.cpp b/zion/interrupt/interrupt.cpp index bc0b5f2..e5665b5 100644 --- a/zion/interrupt/interrupt.cpp +++ b/zion/interrupt/interrupt.cpp @@ -118,8 +118,8 @@ uint64_t cnt = 0; extern "C" void isr_timer(); extern "C" void interrupt_timer(InterruptFrame*) { cnt++; - if (cnt % 1000 == 0) { - dbgln("timer: %u", cnt); + if (cnt % 20 == 0) { + dbgln("timer: %us", cnt * 50 / 1000); } outb(PIC1_COMMAND, PIC_EOI); } diff --git a/zion/zion.cpp b/zion/zion.cpp index d872cc9..503bc56 100644 --- a/zion/zion.cpp +++ b/zion/zion.cpp @@ -22,7 +22,8 @@ extern "C" void zion() { InitSyscall(); - SetFrequency(/* hertz= */ 2000); + // Schedule every 50ms. + SetFrequency(/* hertz= */ 20); sched::InitScheduler(); sched::EnableScheduler();