+void timing_adjust_gps_second(struct timespec* p_time)
+{
+ struct xran_device_ctx * p_xran_dev_ctx = xran_dev_get_ctx();
+
+ long nsec = p_time->tv_nsec + p_xran_dev_ctx->offset_nsec;
+ p_time->tv_sec += p_xran_dev_ctx->offset_sec;
+ if (nsec >= 1e9)
+ {
+ nsec -=1e9;
+ p_time->tv_sec += 1;
+ }
+ p_time->tv_nsec = nsec;
+
+ return;
+}
+uint64_t xran_tick(void)
+{
+ uint32_t hi, lo;
+ __asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
+ return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 );
+}
+
+unsigned long get_ticks_diff(unsigned long curr_tick, unsigned long last_tick)