diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-05-17 17:20:25 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-17 19:19:18 +0200 |
commit | 8a534f189b040c3d8aa5a5a322c22fff159f2fa3 (patch) | |
tree | 0965e5b6e3866f2e4eae695d4c788943ac0707a3 | |
parent | 9ab4bc865b530190eac0d3eca3ff3f8a1b7e1b7e (diff) |
move _gettimeofday() from main.c to libosmo_emb.c
Change-Id: If7f2624a1ddf84fd436670bb8667ad88561c93ae
-rw-r--r-- | sysmoOCTSIM/libosmo_emb.c | 15 | ||||
-rw-r--r-- | sysmoOCTSIM/main.c | 9 |
2 files changed, 15 insertions, 9 deletions
diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index b5be6f1..887887d 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -10,6 +10,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 ***********************************************************************/ diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index b16c817..5c5a1f8 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -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) { |