[求助] 关于时间函数
#i nclude “stdio.h”
#i nclude “stdlib.h”
#i nclude “time.h”
int main( void )
{
long i = 10000000L;
clock_t start, finish;
double duration;
/* 测量一个事件持续的时间*/
printf( "Time to do %ld empty loops is ", i );
start = clock();
while( i-- ) ;
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
printf( "%f seconds\n", duration );
system("pause");
}
我运行的时候怎么说我'CLOCKS_PER_SEC'没有定义呢?