clock()函数
函数名:clock()
头文件:time.h
返回变量:clock_t 类型变量
相关常量:CLOCKS_PER_SEC ( = clock_t 1000)
使用:
#include <cstdio> #include <ctime> int main() { clock_t first = clock(); //测试语句 clock_t end = clock(); printf("%f\n", (double) (end - first)/CLOCKS_PER_SEC); return 0; }

浙公网安备 33010602011771号