/* Get the time from the Global Timer Counter Register.  */
void XTime_GetTime(XTime *Xtime_Global)
/* Get the time from the Global Timer Counter Register.  */
void XTime_GetTime(XTime *Xtime_Global)
{
	u32 low;
	u32 high;
	do
	{
		high = Xil_In32(GLOBAL_TMR_BASEADDR + GTIMER_COUNTER_UPPER_OFFSET);
		low = Xil_In32(GLOBAL_TMR_BASEADDR + GTIMER_COUNTER_LOWER_OFFSET);
	} while(Xil_In32(GLOBAL_TMR_BASEADDR + GTIMER_COUNTER_UPPER_OFFSET) != high);
	*Xtime_Global = (((XTime) high) << 32U) | (XTime) low;
}