如图所示。对主程序进行计数,结果运行正确,但是计时为0.
使用的计时方法为
#include <c6x.h>
#include <time.h>
clock_t t_overhead, t_start, t_stop, t_opt;
t_start = _itoll(TSCH, TSCL );
(要评估的函数);
t_stop = _itoll(TSCH, TSCL);
t_overhead = t_stop - t_start;
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.
如图所示。对主程序进行计数,结果运行正确,但是计时为0.
使用的计时方法为
#include <c6x.h>
#include <time.h>
clock_t t_overhead, t_start, t_stop, t_opt;
t_start = _itoll(TSCH, TSCL );
(要评估的函数);
t_stop = _itoll(TSCH, TSCL);
t_overhead = t_stop - t_start;