Fixes for hpet counter read, choose better PIT divisor

This commit is contained in:
Jeremy Soller
2022-11-14 13:58:55 -07:00
parent 2052cc8cdc
commit 33aa263deb
9 changed files with 77 additions and 41 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ pub unsafe fn switch() -> bool {
// Set old context as not running and update CPU time
from_context_guard.running = false;
from_context_guard.cpu_time += switch_time - from_context_guard.switch_time;
from_context_guard.cpu_time += switch_time.saturating_sub(from_context_guard.switch_time);
// Set new context as running and set switch time
to_context.running = true;