URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 38 |
Rev 154 |
#include "config.h"
|
#include "config.h"
|
#include "libiberty.h"
|
#include "libiberty.h"
|
#ifdef HAVE_TIME_H
|
#ifdef HAVE_TIME_H
|
#include <time.h>
|
#include <time.h>
|
#endif
|
#endif
|
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
#include <sys/time.h>
|
#include <sys/time.h>
|
#endif
|
#endif
|
|
|
/*
|
/*
|
|
|
@deftypefn Supplemental int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
|
@deftypefn Supplemental int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
|
|
|
Writes the current time to @var{tp}. This implementation requires
|
Writes the current time to @var{tp}. This implementation requires
|
that @var{tz} be NULL. Returns 0 on success, -1 on failure.
|
that @var{tz} be NULL. Returns 0 on success, -1 on failure.
|
|
|
@end deftypefn
|
@end deftypefn
|
|
|
*/
|
*/
|
|
|
int
|
int
|
gettimeofday (struct timeval *tp, void *tz)
|
gettimeofday (struct timeval *tp, void *tz)
|
{
|
{
|
if (tz)
|
if (tz)
|
abort ();
|
abort ();
|
tp->tv_usec = 0;
|
tp->tv_usec = 0;
|
if (time (&tp->tv_sec) == (time_t) -1)
|
if (time (&tp->tv_sec) == (time_t) -1)
|
return -1;
|
return -1;
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.