C语言测试代码运行时间

#include <stdio.h>
#include <time.h>
int main( )
{
long start,end;
start = clock();
//测试的程序段
end = clock();
printf("%ld\n",start-end);//单位:毫秒
return 0;
}

猜你喜欢

转载自blog.csdn.net/JxufeCarol/article/details/82431702