aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-08-17 13:27:20 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-17 14:04:01 +0000
commit36abeadc7ba6ff15a3e01230195309f87f788f33 (patch)
tree9bfc20e14f578ea100825cc27bd61f86c0440c7d /src
parent107fb59e84b12bbf6bdfdd4fc241dbcda7332706 (diff)
Use osmo_clock_gettime from libosmocore
Diffstat (limited to 'src')
-rw-r--r--src/gprs/gb_proxy.c6
-rw-r--r--src/gprs/gb_proxy_vty.c4
-rw-r--r--src/gprs/gprs_llc_vty.c2
-rw-r--r--src/gprs/gprs_sgsn.c2
-rw-r--r--src/gprs/gtphub.c2
-rw-r--r--src/gprs/sgsn_cdr.c4
6 files changed, 10 insertions, 10 deletions
diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index dc3c81032..f834ed3e6 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -591,7 +591,7 @@ static int gbprox_process_bssgp_ul(struct gbproxy_config *cfg,
return 0;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
gbprox_update_current_raid(parse_ctx.bssgp_raid_enc, peer,
@@ -707,7 +707,7 @@ static void gbprox_process_bssgp_dl(struct gbproxy_config *cfg,
if (!peer)
return;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
if (parse_ctx.g48_hdr) {
@@ -1432,7 +1432,7 @@ int gbproxy_init_config(struct gbproxy_config *cfg)
LOGP(DGPRS, LOGL_ERROR, "Cannot allocate global counter group!\n");
return -1;
}
- clock_gettime(CLOCK_REALTIME, &tp);
+ osmo_clock_gettime(CLOCK_REALTIME, &tp);
return 0;
}
diff --git a/src/gprs/gb_proxy_vty.c b/src/gprs/gb_proxy_vty.c
index d7d35fe7c..cd10abfda 100644
--- a/src/gprs/gb_proxy_vty.c
+++ b/src/gprs/gb_proxy_vty.c
@@ -491,7 +491,7 @@ DEFUN(show_gbproxy_links, show_gbproxy_links_cmd, "show gbproxy links",
time_t now;
struct timespec ts = {0,};
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
llist_for_each_entry(peer, &g_cfg->bts_peers, list) {
@@ -727,7 +727,7 @@ DEFUN(delete_gb_link, delete_gb_link_cmd,
state = &peer->patch_state;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
if (match == MATCH_STALE) {
diff --git a/src/gprs/gprs_llc_vty.c b/src/gprs/gprs_llc_vty.c
index 1433efefc..418be8348 100644
--- a/src/gprs/gprs_llc_vty.c
+++ b/src/gprs/gprs_llc_vty.c
@@ -71,7 +71,7 @@ static void vty_dump_llme(struct vty *vty, struct gprs_llc_llme *llme)
{
unsigned int i;
struct timespec now_tp = {0};
- clock_gettime(CLOCK_MONOTONIC, &now_tp);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp);
vty_out(vty, "TLLI %08x (Old TLLI %08x) BVCI=%u NSEI=%u %s: "
"IOV-UI=0x%06x CKSN=%d Age=%d: State %s%s", llme->tlli,
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index 904615764..d8bca8577 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -936,7 +936,7 @@ static void sgsn_llme_check_cb(void *data_)
int rc;
- rc = clock_gettime(CLOCK_MONOTONIC, &now_tp);
+ rc = osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp);
OSMO_ASSERT(rc >= 0);
now = now_tp.tv_sec;
diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c
index 4ee20cdcb..ca5857b39 100644
--- a/src/gprs/gtphub.c
+++ b/src/gprs/gtphub.c
@@ -791,7 +791,7 @@ const char* const gtphub_side_idx_names[GTPH_SIDE_N] = {
time_t gtphub_now(void)
{
struct timespec now_tp;
- OSMO_ASSERT(clock_gettime(CLOCK_MONOTONIC, &now_tp) >= 0);
+ OSMO_ASSERT(osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp) >= 0);
return now_tp.tv_sec;
}
diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c
index 7380e74d3..93ed0af04 100644
--- a/src/gprs/sgsn_cdr.c
+++ b/src/gprs/sgsn_cdr.c
@@ -177,7 +177,7 @@ static int cdr_snprintf_pdp(char *buf, size_t size, const char *ev,
if (pdp->ggsn)
inet_ntop(AF_INET, &pdp->ggsn->gsn->gsnc.s_addr, sgsn_addr, sizeof(sgsn_addr));
- clock_gettime(CLOCK_MONOTONIC, &tp);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &tp);
gettimeofday(&tv, NULL);
/* convert the timestamp to UTC */
@@ -267,7 +267,7 @@ static int handle_sgsn_sig(unsigned int subsys, unsigned int signal,
cdr_log_mm(inst, "free", signal_data->mm);
break;
case S_SGSN_PDP_ACT:
- clock_gettime(CLOCK_MONOTONIC, &signal_data->pdp->cdr_start);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &signal_data->pdp->cdr_start);
signal_data->pdp->cdr_charging_id = signal_data->pdp->lib->cid;
cdr_log_pdp(inst, "pdp-act", signal_data->pdp);
osmo_timer_setup(&signal_data->pdp->cdr_timer, cdr_pdp_timeout,