aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/timer/timer.c
diff options
context:
space:
mode:
authorMarvin Borner2019-10-02 20:01:17 +0200
committerMarvin Borner2019-10-02 20:01:17 +0200
commit3238ced93283a167675f20244ec9fd6310eb8002 (patch)
tree288078ca30e9e4b5d5ba9a178315cb5ee9f6a2d8 /src/kernel/timer/timer.c
parent682c47a98844ffec3f3129160e9cdb98ba129989 (diff)
Finally fixed VESA auto resolution finder
This was quite hard and strange but it works now!
Diffstat (limited to 'src/kernel/timer/timer.c')
-rw-r--r--src/kernel/timer/timer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/timer/timer.c b/src/kernel/timer/timer.c
index 45b254e..f332429 100644
--- a/src/kernel/timer/timer.c
+++ b/src/kernel/timer/timer.c
@@ -1,7 +1,7 @@
#include "../interrupts/interrupts.h"
#include "../io/io.h"
-volatile unsigned int timer_ticks = 0;
+static unsigned int timer_ticks = 0;
void timer_phase(int hz) {
int divisor = 1193180 / hz;
@@ -25,6 +25,10 @@ void timer_wait(int ticks) {
}
}
+unsigned int get_time() {
+ return timer_ticks;
+}
+
// Install timer handler into IRQ0
void timer_install() {
timer_phase(100);