+ tm_threshold_high = interval_ns * N_SYM_PER_SLOT * 2;//2 slots
+ tm_threshold_low = interval_ns * 2; //2 symbols
+ //add tm exception handling
+ if (unlikely(labs(delta) > tm_threshold_low)) {
+ print_dbg("poll_next_tick exceed 2 symbols threshold with delta:%ld(ns), used_tick:%ld(tick) \n", delta, used_tick);
+ pCnt->timer_missed_sym++;
+ if(unlikely(labs(delta) > tm_threshold_high)) {
+ print_dbg("poll_next_tick exceed 2 slots threshold, stop xran! delta:%ld(ns), used_tick:%ld(tick) \n", delta, used_tick);
+ //xran_if_current_state = XRAN_STOPPED;
+ pCnt->timer_missed_slot++;
+ }
+ }
+ if(delta > 0 || (delta < 0 && labs(delta) < THRESHOLD)) {
+ if (debugStop &&(debugStopCount > 0) && (pCnt->tx_counter >= debugStopCount)){
+ uint64_t t1;
+ printf("STOP:[%ld.%09ld], debugStopCount %d, tx_counter %ld\n", p_cur_time->tv_sec, p_cur_time->tv_nsec, debugStopCount, pCnt->tx_counter);
+ t1 = MLogTick();
+ rte_pause();
+ MLogTask(PID_TIME_SYSTIME_STOP, t1, MLogTick());
+ xran_if_current_state = XRAN_STOPPED;
+ }