From 45d78d33fb785ae7f7b01447ad13b0f9bc535980 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 30 Oct 2017 16:44:52 -0700 Subject: [PATCH] Consider negative elapsed time values in activity monitor due to multiple PHY threads. Fixes issue #111 --- srsenb/src/upper/rrc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srsenb/src/upper/rrc.cc b/srsenb/src/upper/rrc.cc index 35abda80a..e176e8ac5 100644 --- a/srsenb/src/upper/rrc.cc +++ b/srsenb/src/upper/rrc.cc @@ -768,9 +768,9 @@ bool rrc::ue::is_timeout() } if (deadline_str) { - uint64_t deadline = deadline_s*1e6 + deadline_us; - uint64_t elapsed = t[0].tv_sec*1e6 + t[0].tv_usec; - if (elapsed > deadline) { + int64_t deadline = deadline_s*1e6 + deadline_us; + int64_t elapsed = t[0].tv_sec*1e6 + t[0].tv_usec; + if (elapsed > deadline && elapsed > 0) { parent->rrc_log->warning("User rnti=0x%x expired %s deadline: %d:%d>%d:%d us\n", rnti, deadline_str, t[0].tv_sec, t[0].tv_usec,