sys/newlib: gettimeofday() returns time since boot, not current wall time. #9187
Labels
Area: POSIX
Area: POSIX API wrapper
Area: timers
Area: timer subsystems
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Description
PR #4286 added support for
gettimeofday()
by implementing it on top ofxtimer_now_usec64()
.This definition is in conflict with the specification, which says:
Expected results
The current wall time is returned (if the board has a RTC). Otherwise, either the function should be made unavailable (this triggering a linker error if it is used), or it should always fail.
Actual results
gettimeofday()
returns time since boot if xtimer was compiled in. If not, it fails withENOSYS
.Related to
issue: #10523
The text was updated successfully, but these errors were encountered: