Update the timer to a more reasonable time slice of 50ms
This commit is contained in:
parent
9869d1022a
commit
496dfeaef9
|
@ -118,8 +118,8 @@ uint64_t cnt = 0;
|
||||||
extern "C" void isr_timer();
|
extern "C" void isr_timer();
|
||||||
extern "C" void interrupt_timer(InterruptFrame*) {
|
extern "C" void interrupt_timer(InterruptFrame*) {
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt % 1000 == 0) {
|
if (cnt % 20 == 0) {
|
||||||
dbgln("timer: %u", cnt);
|
dbgln("timer: %us", cnt * 50 / 1000);
|
||||||
}
|
}
|
||||||
outb(PIC1_COMMAND, PIC_EOI);
|
outb(PIC1_COMMAND, PIC_EOI);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,8 @@ extern "C" void zion() {
|
||||||
|
|
||||||
InitSyscall();
|
InitSyscall();
|
||||||
|
|
||||||
SetFrequency(/* hertz= */ 2000);
|
// Schedule every 50ms.
|
||||||
|
SetFrequency(/* hertz= */ 20);
|
||||||
sched::InitScheduler();
|
sched::InitScheduler();
|
||||||
sched::EnableScheduler();
|
sched::EnableScheduler();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue