CVI里如何计算某段代码的执行时间?
CVI里有没有计算某段代码的执行时间的函数?回复 1# chenyuan1030 的帖子
可以调用标准C语言中函数clock()获得毫秒级精度定时。clock_t start,finish;
start=clock();
do something...
finish=clock();
......
需要头函数time.h
回复 1# chenyuan1030 的帖子
补充:double duration;
duration=(double)(finish-start)/CLOCKS_PER_SEC;
CLOCKS_PER_SEC在time.h中有定义。
页:
[1]