XTime tEnd, tCur; u32 tUsed; XTime_GetTime(&tCur); usleep(1345); XTime_GetTime(&tEnd); tUsed = ((tEnd-tCur)*1000000)/(COUNTS_PER_SECOND); xil_printf("time elapsed is %d us\r\n",tUsed); 这里是由Cortex-A9的全局定时器读取的计数值,该定时器使用的是CPU时钟的二分频。