【发布时间】:2016-04-27 11:50:01
【问题描述】:
#include <stdio.h>
#include <time.h>
clock_t start, stop;
int main(){
start = clock();
function();
stop = clock();
double duration = (stop - start)/CLK_TCK;
return 0;
}
我在 Xcode 中遇到了问题。 CLK_TCK 未声明。 如何解决?
【问题讨论】:
-
使用
CLOCKS_PER_SEC?请阅读clock()的手册页。 -
this的可能重复