X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/9eed27f6f2f002145667fb4abfc5e476b53630e5..35a7d633d3f16c1e0539af6ca5d8e7482926cd93:/lunaix-os/kernel/time/clock.c diff --git a/lunaix-os/kernel/time/clock.c b/lunaix-os/kernel/time/clock.c index 3170731..a5b9dd8 100644 --- a/lunaix-os/kernel/time/clock.c +++ b/lunaix-os/kernel/time/clock.c @@ -19,12 +19,8 @@ __clock_read_datetime(struct twimap* map) clock_walltime(&dt); twimap_printf(map, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d", - dt.year, - dt.month, - dt.day, - dt.hour, - dt.minute, - dt.second); + dt.year, dt.month, dt.day, + dt.hour, dt.minute, dt.second); } void @@ -78,20 +74,5 @@ clock_systime() void clock_walltime(datetime_t* datetime) { - sysrtc->get_walltime(sysrtc, datetime); -} - -void -clock_init() -{ - int idx = 0; - struct device_def* pos; - foreach_exported_device_of(load_timedev, idx, pos) - { - if (pos->class.device != DEV_RTC) { - continue; - } - - pos->init(pos); - } + sysrtc->ops->get_walltime(sysrtc, datetime); } \ No newline at end of file