From f9783c58f77e4d0bb371c6b1bc160be1bf8495bb Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 19 Apr 2023 18:12:16 +0200 Subject: [PATCH] tbf: Store initial timestamp during constructor Like already done for other timestamps. This helps in simplifying the setup() call. Change-Id: Ia0c2d0f5456b211169fb6c71f5f3c2e2b8760a28 --- src/tbf.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tbf.cpp b/src/tbf.cpp index e972bd09..797a95de 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -127,6 +127,8 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms, gprs_ m_name_buf[0] = '\0'; m_created_ts = time(NULL); + /* set timestamp */ + osmo_clock_gettime(CLOCK_MONOTONIC, &meas.rssi_tv); } @@ -586,9 +588,6 @@ int gprs_rlcmac_tbf::setup(int8_t use_trx, bool single_slot) /* assign initial control ts */ tbf_assign_control_ts(this); - /* set timestamp */ - osmo_clock_gettime(CLOCK_MONOTONIC, &meas.rssi_tv); - LOGPTBF(this, LOGL_INFO, "Allocated: trx = %d, ul_slots = %02x, dl_slots = %02x\n", this->trx->trx_no, ul_slots(), dl_slots());