aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/timer.c
diff options
context:
space:
mode:
authorMarvin Borner2020-09-06 23:27:29 +0200
committerMarvin Borner2020-09-06 23:27:29 +0200
commit97f57cf4da45d268bbea863ae7bf40bb8c749aad (patch)
treef9804ce5cf22922aab0a425ed8007b03bb0761f6 /kernel/drivers/timer.c
parent586d58192b2c576393077c3944338b582c873f45 (diff)
Some timer thingies
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