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.

CCS5中用什么方法计算算法使用的时间?



我原来在程序中使用clock()来统计程序运行的时间,但是因为算法运行的时间过长,clock()获得的值有时会成为负数(溢出?)。使用time()来获取时间,但是其精度只能到秒。请问应该使用什么方法来获得算法运行的时间(1分多钟的时间,希望获得小数点后两路的精度)