move _gettimeofday() from main.c to libosmo_emb.c

Change-Id: If7f2624a1ddf84fd436670bb8667ad88561c93ae
This commit is contained in:
Harald Welte 2019-05-17 17:20:25 +02:00
parent 9ab4bc865b
commit 8a534f189b
2 changed files with 15 additions and 9 deletions

View File

@ -9,6 +9,21 @@
extern void *g_tall_ctx;
void *g_msgb_ctx;
/***********************************************************************
* Timers
***********************************************************************/
#include <sys/time.h>
/* FIXME: Implement it bsed on jiffies and/or RTC! */
int _gettimeofday(struct timeval *tv, void *tz)
{
tv->tv_sec = 0;
tv->tv_usec = 0;
return 0;
}
/***********************************************************************
* Logging
***********************************************************************/

View File

@ -980,15 +980,6 @@ DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory")
g_tall_ctx = NULL;
}
/* dependency of libosmocore. FIXME: Implement it bsed on jiffies and/or RTC! */
#include <sys/time.h>
int _gettimeofday(struct timeval *tv, void *tz)
{
tv->tv_sec = 0;
tv->tv_usec = 0;
return 0;
}
/* Section 9.6 of SAMD5x/E5x Family Data Sheet */
static int get_chip_unique_serial(uint8_t *out, size_t len)
{