#include "time.h"

来源:互联网 发布:数据永不眠 编辑:程序博客网 时间:2024/05/16 09:32

/*calculate time*/
#include "time.h"
#include "stdio.h"
main()
{ time_t start,end;
int i;
start=time(NULL);
for(i=0;i<3000;i++)
{ printf("\1\1\1\1\1\1\1\1\1\1\n");}
end=time(NULL);
printf("\1: The different is %6.3f\n",difftime(end,start));
}

------------------------------------------------------------------------------

http://www.zhiyin.cn/ylzx/gzpx/5467249401.html
http://www.zznews.cn/hyzx/jkxx/5470498705.html
-----------------------------------------------------------------------------
【程序93】
题目:时间函数举例3
1.程序分析:
2.程序源代码:
/*calculate time*/
#include "time.h"
#include "stdio.h"
main()
{ clock_t start,end;
int i;
double var;
start=clock();
for(i=0;i<10000;i++)
{ printf("\1\1\1\1\1\1\1\1\1\1\n");}
end=clock();
printf("\1: The different is %6.3f\n",(double)(end-start));
}

-----------------------------------------------------------------------------

0 0
原创粉丝点击