C语言—计时程序运行时间 #include <time.h>

C语言—计时程序运行时间 #include <time.h>,第1张

C语言—计时程序运行时间 #include <time.h>

头文件        #include

clock_t start, end;        //定义

start = clock();

...

...

end = clock();

得到
运行时间        double time = (double)(end - start)/CLOCKS_PER_SEC;

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/4752359.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-08
下一篇 2022-11-08

发表评论

登录后才能评论

评论列表(0条)

保存