Files
codezero/conts/posix/libposix/time.c
Bahadir Balban f0bb0a4657 Added posix code
2009-09-29 21:55:59 +03:00

19 lines
318 B
C

#include <l4lib/arch/syscalls.h>
#include <sys/time.h>
#include <errno.h>
#include <libposix.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;
}