I'm pretty sure it's fine in libc

This commit is contained in:
Gitea 2020-12-24 22:37:55 -06:00
parent 660dfcb6a7
commit 9ed9946af2

View file

@ -1,8 +1,5 @@
#include <time.h> #include <time.h>
#ifdef __is_libk
#include <kernel/cmos.h> #include <kernel/cmos.h>
#endif
unsigned int get_days(unsigned int year, unsigned char month, unsigned char day) { unsigned int get_days(unsigned int year, unsigned char month, unsigned char day) {
unsigned int tot_days = day - 1; unsigned int tot_days = day - 1;
@ -26,11 +23,7 @@ unsigned int get_days(unsigned int year, unsigned char month, unsigned char day)
time_t time(time_t * tloc) { time_t time(time_t * tloc) {
time_t ret_val; time_t ret_val;
#ifdef __is_libk
ret_val = read_rtc(); ret_val = read_rtc();
#else
/* TODO: Implement system calls for this stuff */
#endif
if(tloc != 0) { if(tloc != 0) {
*tloc = ret_val; *tloc = ret_val;