mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-16 00:49:31 +08:00
087c066735
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1116 bbd45198-f89e-11dd-88c7-29a3b14d5316
33 lines
471 B
C
33 lines
471 B
C
#include <rtthread.h>
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/time.h>
|
|
|
|
/* some newlib leaked function in CodeSourcery G++ Lite for MIPS version */
|
|
|
|
int
|
|
getpid()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
gettimeofday(struct timeval *__tp, void *__tzp)
|
|
{
|
|
struct timespec tp;
|
|
|
|
if (libc_get_time(&tp) == 0)
|
|
{
|
|
if (__tp != RT_NULL)
|
|
{
|
|
__tp->tv_sec = tp.tv_sec;
|
|
__tp->tv_usec = tp.tv_nsec * 1000UL;
|
|
}
|
|
|
|
return tp.tv_sec;
|
|
}
|
|
|
|
return 0;
|
|
}
|