From fa432bdd26e728d1f3c853f0d0f7b8a9835ee70a Mon Sep 17 00:00:00 2001
From: Laurent <laurent.thomas@open-cells.com>
Date: Mon, 13 Feb 2017 13:58:09 +0100
Subject: [PATCH] optim measurement function checkcpu()

---
 targets/RT/USER/lte-ue.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index 0f341d29a56..1292fef0957 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -528,9 +528,11 @@ static void *UE_thread_rxn_txnp4(void *arg) {
         initRefTimes(t3);
         pickTime(current);
         updateTimes(proc->gotIQs, &t2, 10000, "Delay to wake up UE_Thread_Rx (case 2)");
+      check(2200);
 
         // Process Rx data for one sub-frame
         lte_subframe_t sf_type = subframe_select( &UE->frame_parms, proc->subframe_rx);
+      check(100);
         if ((sf_type == SF_DL) ||
                 (UE->frame_parms.frame_type == FDD) ||
                 (sf_type == SF_S)) {
@@ -553,7 +555,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
             }
             phy_procedures_UE_RX( UE, proc, 0, 0, UE->mode, no_relay, NULL );
         }
-
+        check(900);
         if (UE->mac_enabled==1) {
 
             ret = mac_xface->ue_scheduler(UE->Mod_id,
@@ -583,6 +585,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
                        UE->Mod_id, proc->frame_rx, proc->subframe_tx,txt );
             }
         }
+	check(350);
         // Prepare the future Tx data
 
         if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_UL) ||
@@ -596,6 +599,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
             if (UE->mode != loop_through_memory)
                 phy_procedures_UE_S_TX(UE,0,0,no_relay);
         updateTimes(current, &t3, 10000, "Delay to process sub-frame (case 3)");
+       check(300);
 
     }
 
@@ -603,10 +607,6 @@ static void *UE_thread_rxn_txnp4(void *arg) {
     return &UE_thread_rxtx_retval;
 }
 
-#define RX_OFF_MAX 10
-#define RX_OFF_MIN 5
-#define RX_OFF_MID ((RX_OFF_MAX+RX_OFF_MIN)/2)
-
 /*!
  * \brief This is the main UE thread.
  * This thread controls the other three UE threads:
-- 
GitLab