Merge pull request #8278 from smlng/cpu/native/replace_timex
cpu, native: replace timex_t in syscalls
This commit is contained in:
commit
c982cc81ed
@ -424,10 +424,9 @@ int getpid(void)
|
|||||||
int _gettimeofday(struct timeval *tp, void *restrict tzp)
|
int _gettimeofday(struct timeval *tp, void *restrict tzp)
|
||||||
{
|
{
|
||||||
(void) tzp;
|
(void) tzp;
|
||||||
timex_t now;
|
uint64_t now = xtimer_now_usec64();
|
||||||
xtimer_now_timex(&now);
|
tp->tv_sec = now / US_PER_SEC;
|
||||||
tp->tv_sec = now.seconds;
|
tp->tv_usec = now - tp->tv_sec;
|
||||||
tp->tv_usec = now.microseconds;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user