From 51d4dd040a291b62c648ff6cc0d7e0058cf4056f Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 17 Aug 2018 17:51:51 +0200 Subject: starting implicit function calls cleanup --- kernel/syscalls.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'kernel/syscalls.c') diff --git a/kernel/syscalls.c b/kernel/syscalls.c index e3db767..c507a4e 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -10,6 +10,9 @@ #include #include +// TODO: use includes!!! +uint64_t timer_get_ms(); + int syscall_unhandled(int nr) { log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"syscall: %d", nr); @@ -20,13 +23,15 @@ int syscall_gettimeofday(struct timeval *tv, struct timezone *tz) { if(tv!=NULL) { - uint32_t t=timer_get_ms(); - tv->tv_sec=t/1000; + uint64_t t=timer_get_ms(); + tv->tv_sec=t/1000+2*3600; // add gmt+2 tv->tv_usec=0;//t-tv->tv_sec*1000; } + + // tz struct is obsolote if(tz!=NULL) { - tz->tz_minuteswest=0; + tz->tz_minuteswest=0;// -21*60; // warsaw tz->tz_dsttime=DST_NONE; } return 0; -- cgit v1.2.3