我原来在程序中使用clock()来统计程序运行的时间,但是因为算法运行的时间过长,clock()获得的值有时会成为负数(溢出?)。使用time()来获取时间,但是其精度只能到秒。请问应该使用什么方法来获得算法运行的时间(1分多钟的时间,希望获得小数点后两路的精度)
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.
其实C66x的内核可以通过访问寄存器TSCL和TSCH两个寄存器来记录时间,总共64bit的寄存器,单位是DSP cycles