From f63f3b2a4b58eeaa84a2b6889de9634fdf6ada86 Mon Sep 17 00:00:00 2001 From: smlng Date: Tue, 19 Dec 2017 09:32:42 +0100 Subject: [PATCH] cpu, native: replace timex_t in syscalls --- cpu/native/syscalls.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpu/native/syscalls.c b/cpu/native/syscalls.c index 765044d9f1..483d4a7968 100644 --- a/cpu/native/syscalls.c +++ b/cpu/native/syscalls.c @@ -424,10 +424,9 @@ int getpid(void) int _gettimeofday(struct timeval *tp, void *restrict tzp) { (void) tzp; - timex_t now; - xtimer_now_timex(&now); - tp->tv_sec = now.seconds; - tp->tv_usec = now.microseconds; + uint64_t now = xtimer_now_usec64(); + tp->tv_sec = now / US_PER_SEC; + tp->tv_usec = now - tp->tv_sec; return 0; } #endif