diff --git a/cpu/native/syscalls.c b/cpu/native/syscalls.c index 765044d9f19aca06054bf042c4f49e69dd61a0e4..483d4a796878efe845a4b5ea4211bd00f98eb811 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