From 97f57cf4da45d268bbea863ae7bf40bb8c749aad Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 6 Sep 2020 23:27:29 +0200 Subject: Some timer thingies --- kernel/drivers/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kernel/drivers/timer.c') diff --git a/kernel/drivers/timer.c b/kernel/drivers/timer.c index 788e286..8029a2a 100644 --- a/kernel/drivers/timer.c +++ b/kernel/drivers/timer.c @@ -22,7 +22,10 @@ u32 timer_get() void timer_handler() { - timer_ticks++; + if (timer_ticks >= U32_MAX) + timer_ticks = 0; + else + timer_ticks++; } // "Delay" function with CPU sleep -- cgit v1.2.3