OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [libposix/] [time.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
 
2
#include <sys/time.h>
3
#include <errno.h>
4
#include <libposix.h>
5
 
6
int gettimeofday(struct timeval *tv, struct timezone *tz)
7
{
8
        int ret = l4_time(tv, 0);
9
 
10
        /* If error, return positive error code */
11
        if (ret < 0) {
12
                errno = -ret;
13
                return -1;
14
        }
15
        /* else return value */
16
        return ret;
17
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.