git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git]
/
lunaix-os
/
kernel
/
time
/
clock.c
diff --git
a/lunaix-os/kernel/time/clock.c
b/lunaix-os/kernel/time/clock.c
index 2dc4e8153359fc91c3137db86021b1bd86b457ee..3770dd00ce3088aa4dfff566768aa2615ff69a04 100644
(file)
--- a/
lunaix-os/kernel/time/clock.c
+++ b/
lunaix-os/kernel/time/clock.c
@@
-51,12
+51,6
@@
clock_build_mapping()
}
EXPORT_TWIFS_PLUGIN(sys_clock, clock_build_mapping);
}
EXPORT_TWIFS_PLUGIN(sys_clock, clock_build_mapping);
-void
-clock_init()
-{
- hwrtc_init();
-}
-
time_t
clock_unixtime()
{
time_t
clock_unixtime()
{
@@
-68,6
+62,10
@@
clock_unixtime()
time_t
clock_systime()
{
time_t
clock_systime()
{
+ if (!current_timer) {
+ return 0;
+ }
+
ticks_t t = hwtimer_current_systicks();
return t / current_timer->running_freq;
}
ticks_t t = hwtimer_current_systicks();
return t / current_timer->running_freq;
}
@@
-75,5
+73,5
@@
clock_systime()
void
clock_walltime(datetime_t* datetime)
{
void
clock_walltime(datetime_t* datetime)
{
-
current_rtc->get_walltime(current
_rtc, datetime);
+
primary_rtc->get_walltime(primary
_rtc, datetime);
}
\ No newline at end of file
}
\ No newline at end of file