时间函数举例2

/*calculate time*/
#include <stdio.h>
#include <conio.h>
#include <time.h>
int main()
{     /*时间函数举例2 在vc 和win-tc 中结果不同*/
    time_t start,end;
    int i;
    start=time(NULL);
    for (i=0;i<30000;i++)
        printf("\1\1\1\1\1\1\1\1\1\1\n");
    end=time(NULL);
    printf("\1:the different time is %6.3f\n",difftime(end,start));
    getch();
    return 0;
}

posted @ 2013-03-04 14:39  王井玉  阅读(132)  评论(0编辑  收藏  举报