feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git] / lunaix-os / kernel / time / clock.c
index ef557c784e8dd47895a4f1148874d9f1cd1e02aa..3770dd00ce3088aa4dfff566768aa2615ff69a04 100644 (file)
@@ -51,12 +51,6 @@ clock_build_mapping()
 }
 EXPORT_TWIFS_PLUGIN(sys_clock, clock_build_mapping);
 
-void
-clock_init()
-{
-    // hwrtc_init();
-}
-
 time_t
 clock_unixtime()
 {
@@ -68,6 +62,10 @@ clock_unixtime()
 time_t
 clock_systime()
 {
+    if (!current_timer) {
+        return 0;
+    }
+
     ticks_t t = hwtimer_current_systicks();
     return t / current_timer->running_freq;
 }