Timer: add raw_ticks

This commit is contained in:
apio 2022-12-07 14:31:40 +01:00 committed by Gitea
parent fd6a74e61c
commit c657b302c9

View File

@ -58,6 +58,11 @@ namespace Timer
timer_ticks++; timer_ticks++;
} }
usize raw_ticks()
{
return timer_ticks;
}
usize ticks() usize ticks()
{ {
return ticks_ms() / 1000; return ticks_ms() / 1000;
@ -130,5 +135,6 @@ namespace Timer
bool should_invoke_scheduler() bool should_invoke_scheduler()
{ {
// FIXME: Modulo is SLOW. We're calling this every tick.
return (timer_ticks % ARCH_TIMER_FREQ) == 0; return (timer_ticks % ARCH_TIMER_FREQ) == 0;
} }