pespin has uploaded this change for review.

View Change

tbf: Store initial timestamp during constructor

Like already done for other timestamps.
This helps in simplifying the setup() call.

Change-Id: Ia0c2d0f5456b211169fb6c71f5f3c2e2b8760a28
---
M src/tbf.cpp
1 file changed, 14 insertions(+), 3 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/76/32376/1
diff --git a/src/tbf.cpp b/src/tbf.cpp
index e972bd0..797a95d 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -127,6 +127,8 @@
m_name_buf[0] = '\0';

m_created_ts = time(NULL);
+ /* set timestamp */
+ osmo_clock_gettime(CLOCK_MONOTONIC, &meas.rssi_tv);
}


@@ -586,9 +588,6 @@
/* 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());

To view, visit change 32376. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia0c2d0f5456b211169fb6c71f5f3c2e2b8760a28
Gerrit-Change-Number: 32376
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange