This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何用定时器统计程序中每次循环运行的时间

我用定时器统计程序中一个大循环每次循环运行的时间:向上计数,用TimerValueGet(TIMER0_BASE,TIMER_A)获得当前计数值,之后马上清零开始下一次统计。在每次循环中调用,这样就可以获得一次循环的值。那用什么来清零计数器呢?如果这个办法不行的话,有什么好的办法呢?