aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/timer.c')
-rw-r--r--kernel/drivers/timer.c5
1 files changed, 4 insertions, 1 deletions
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