mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 19:03:15 +01:00
18 lines
296 B
C
18 lines
296 B
C
|
|
#include <l4lib/arch/syscalls.h>
|
|
#include <sys/time.h>
|
|
#include <errno.h>
|
|
|
|
int gettimeofday(struct timeval *tv, struct timezone *tz)
|
|
{
|
|
int ret = l4_time(tv, 0);
|
|
|
|
/* If error, return positive error code */
|
|
if (ret < 0) {
|
|
errno = -ret;
|
|
return -1;
|
|
}
|
|
/* else return value */
|
|
return ret;
|
|
}
|