XTime tend,tcur;
u32 tused;
XTime_GetTime(&tcur);
XTime_GetTime(&tend);
tused=((tend-tcur)*1000000)/(COUNTS_PER_SECOND);
printf("Time is %d us\r\n",tused);
COUNTS_PER_SECOND:
/* Global Timer is always clocked at half of the CPU frequency */
XTime tend,tcur;
int main(){
u32 tused;
XTime_GetTime(&tcur);
usleep(13);
XTime_GetTime(&tend);
tused=((tend-tcur)*1000000)/(COUNTS_PER_SECOND);
printf("time is %d us\r\n",tused);
}
END